Image processing apparatus, image forming apparatus, image reading process apparatus, image processing method, image processing program, and computer-readable storage medium

ABSTRACT

An image processing apparatus is provided with a halftone frequency determining section for determining a halftone frequency of an image data consisting of plural color components. The halftone frequency determining section is provided with a flat halftone discriminating section for extracting information of density distribution per segment block, and discriminating, based on the information of density distribution, whether or not the segment block is a flat halftone region in which density transition is low; a threshold value determining section for determining a threshold value by using an adjusting value that is predetermined in accordance with a reading property of the image reading apparatus with respect to respective color components, the threshold value being for use in extraction of the binary data of the pixel density; a maximum transition number averaging section for averaging the transition numbers of the binary data, the transition numbers being worked out by using the threshold value; and a halftone frequency estimating section for estimating the halftone frequency, based on the average. With this arrangement, it is possible to realize an image processing apparatus capable of performing highly accurate halftone frequency determination even for composite color halftone.

This Nonprovisional application claims priority under 35 U.S.C. § 119(a)on Patent Application No. 2005/014803 filed in Japan on Jan. 21, 2005,the entire contents of which are hereby incorporated by reference.

FIELD OF THE INVENTION

The present invention relates to an image processing apparatus and imageprocessing method in which a level of halftone frequency of an imagesignal obtained by document scanning is determined (i.e. found out) andprocess is suitably carried out based on the determined level ofhalftone frequency so as to improve quality of an outputted image. Theimage processing apparatus and image processing method are for use indigital copying machines, facsimile machines, and the like. The presentinvention further relates to an image reading process apparatus andimage forming apparatus provided with the same, and to a program and astorage medium.

BACKGROUND OF THE INVENTION

In digital color image input apparatuses (such as digital scanners,digital still cameras, and the like), tristimulus color information (R,G, B) is obtained via a solid-state image sensing element (CCD) thatserves as a color separation system. The tristimulus color information,which is obtained in a form of analog signals, is then converted todigital signals, which are used as input signals that represent inputcolor image data (color information). Segmentation is carried out sothat display or output is carried out most suitably according to thesignals obtained via the image input apparatus. The segmentationpartitions a read document image into regions of equivalent propertiesso that each region can be processed with image process most suitablethereto. This makes it possible to reproduce a good-quality image.

In general, the segmentation of a document image includes discriminatinga text region, a halftone region (halftone area) and photo region (inanother words, contone region, which is sometimes expressed as otherregion) in the document image to read, so that quality improvementprocess can be switched over for the determined respective regions. Thisattains higher reproduction quality of the image.

Furthermore, the halftone regions (image) have halftone varied from lowfrequencies to high frequencies, such as 65 line/inch, 85 line/inch, 100line/inch, 120 line/inch, 133 line/inch, 150 line/inch, 175 line/inch,200 line/inch, and the like. Therefore, various methods have beenproposed for determining halftone frequencies so as to perform suitableprocess according to the determination.

For example, Japanese Unexamined Patent Publication, Tokukai, No.2001-218046 (published on Aug. 10, 2001) discloses a method in which asimilar peak is determined from a degree of similarity between a currentblock and a block located within a region which is distanced from thecurrent block by a given number of pixels, and if the region is ahalftone region, a halftone frequency is determined (i.e., found out)based on a peak nearest to a center of the halftone region.

Moreover, Japanese Patent No. 3093235 (issued on Oct. 3, 2000), andJapanese Unexamined Patent Publication No. 2002-77623 (published on Mar.15, 2002) disclose a method in which halftone frequency determination isperformed based on a number of peak pixels, which is a number of peakpixels in a predetermined number of block where the peak pixels arefound using a mask of M pixels×N pixels (where M and N are integerspredetermined experimentally).

Moreover, for example, Japanese Unexamined Patent Publication No.2004-96535 (published on Mar. 25, 2004) discloses a method in whichabsolute differences in pixel value between given pixels and pixelsadjacent thereto are compared with a first threshold value so as tocalculate out (find out) a number of pixels (low-frequency halftonepixels) whose absolute differences in pixel value are larger than thefirst threshold value, and then this number of the pixels is comparedwith a second threshold value so as to obtain a comparison result onwhich the halftone frequency of a halftone region is estimated (i.e.,determined).

Moreover, Japanese Unexamined Patent Publications, Tokukai, No.2004-102551 (published on Apr. 2, 2004), and No. 2004-328292 (publishedon November 18) disclose methods for determining a halftone frequencybased on a number of changeover (i.e., transition number) of the binaryvalues of binary data of an input image.

According to Japanese Unexamined Patent Publication, Tokukai, No.2001-218046 (published on Aug. 10, 2001), whether the halftone iscomposite color halftone or single-color halftone is not taken intoconsideration it is difficult to accurately determine the halftonefrequency with respect to the composite color halftone region.

According to Japanese Patent No. 3093235 (issued on Oct. 3, 2000), andJapanese Unexamined Patent Publication No. 2002-77623 (published on Mar.15, 2002), the halftone frequency determination is performed based onthe number of peak pixels of the predetermined number of blocks.However, a composite color halftone and a single-color halftone of likehalftone frequency give largely different numbers of peak pixels, wherethe composite color halftone is a halftone consisting of at least two ofcyan (hereinafter, C), magenta (hereinafter, M), yellow (hereinafter,Y), and black (hereinafter K), and the single-color halftone is ahalftone consisting of one of CMYK. In other words, it is difficult todistinguish the composite color halftone and the single-color halftonehaving similar numbers of peak pixels but different halftonefrequencies. For example, it is difficult to distinguish a 133 line/inchcomposite color halftone and 175 line/inch single-color halftone, whichhave similar numbers of peak pixels. Therefore, it is impossible toextract a number of peak pixels of a particular color component.

Moreover, Japanese Unexamined Patent Publications, Tokukai, No.2004-96535 (published on Mar. 25, 2004) extracts the low-frequencyhalftone pixels whose absolute differences in pixel value between thegiven pixels and adjacent pixels are larger than the first thresholdvalue, and the judgment as to whether the halftone is low or high ismade based on the number of the low-frequency halftone pixels.Therefore, in is difficult to determine the halftone frequencyaccurately.

In the methods disclosed in Japanese Unexamined Patent Publications,Tokukai, No. 2004-102551 (published on Apr. 2, 2004), and No.2004-328292 (published on November 18), the halftone frequency isdetermined based the number of changeover (i.e., transition number) ofthe binary values of the binary data of the input image, but noinformation of density distribution is taken into consideration.Therefore, with this method, binarization of a halftone region in whichdensity transition is high is associated with the following problem(here, what is meant by the term “density” is “density in color, thatis, pixel value in color”. So, for example, what is meant by the term“pixel density” is “density of color of the pixel”, but not populationof the pixels”).

FIG. 32(a) illustrates an example of one line along a main scanningdirection of segment blocks in a halftone region in which the densitytransition is high. FIG. 32(b) illustrates the change of the density inFIG. 32(a). Here, it is put, for example, that a threshold value th1illustrated in FIG. 32(b) is used as a threshold value for generation ofbinary data. In this case, as illustrated in FIG. 32(d), the segmentblocks are discriminated into white pixel portions (that representlow-density halftone portion) and black pixel portions (that representhigh-density halftone portion), thereby failing to attain suchextraction in which black pixel portions (that represent a printedportion in the halftone) are extracted as illustrated in FIG. 32(c). Useof the other threshold value values th2 a and th2 b gives the sameresult. With such extraction as illustrated in FIG. 32(d), it isimpossible to generate binary data that reproduce halftone frequencyaccurately. This results in inaccurate halftone frequency determination.

SUMMARY OF THE INVENTION

An object of the present invention is to provide an image processingapparatus and an image processing method, which are capable to extract afeature of a particular color component selectively, and further toprovide (a) an image reading process apparatus and an image formingapparatus provided with the image processing apparatus, (b) an imageprocessing program, and a computer-readable storage medium in which theimage processing program is stored. More specifically, the object of thepresent invention is to provide an image processing apparatus and animage processing method which allows highly accurate halftone frequencydetermination by determining, as having the same halftone frequencies, acomposite color halftone and a single-color halftone that have the samehalftone frequencies but are largely different in number of peak pixelsin a current block, and further to provide (a) an image reading processapparatus and an image forming apparatus provided with the imageprocessing apparatus, (b) an image processing program, and acomputer-readable storage medium in which the image processing programis stored.

In order to attain the object, an image processing apparatus accordingto the present invention is provided with a halftone frequencydetermining section for determining a halftone frequency of an imagethat has been read from a document by an image reading apparatus, thehalftone frequency determining section being arranged as follows. Thehalftone frequency determining section is provided with a flat halftonediscriminating section for extracting information of densitydistribution per segment block consisting of a plurality of pixels, anddiscriminating, based on the information of density distribution,whether the segment block is a flat halftone region which is a halftoneregion in which density transition is low, or a non-flat halftone regionwhich is a halftone region in which the density transition is high; athreshold value determining section for determining a threshold value byusing an adjusting value that is predetermined in accordance with areading property of the image reading apparatus with respect torespective color components, the threshold value being for use inextraction of a feature of density transition between pixels (an exampleof a feature of the segment block that represents a state of the densitytransition between pixels); an extracting section for extracting, byusing the threshold value determined by the threshold value determiningsection, the feature of density transition between pixels of the segmentblock which the flat halftone discriminating section discriminates asthe flat halftone region; and a halftone frequency estimating sectionfor estimating the halftone frequency, based on the feature extracted bythe extracting section.

Here, the segment block is not limited to a rectangular region and mayhave any kind of shape arbitrarily.

In this arrangement, the flat halftone discriminating section extractsinformation of density distribution per segment block consisting of aplurality of pixels, and discriminates, based on the information ofdensity distribution, whether a given segment block is a flat halftoneregion (in which the density transition is low) or a non-flat halftoneregion (in which the density transition is high). Then, the extractingsection extracts the feature of density transition between pixels of thesegment block which the flat halftone discriminating sectiondiscriminates as the flat halftone region. The halftone frequency isdetermined based on the feature.

As described above, the halftone frequency is determined based on thefeature of the segment block which is included in the flat halftoneregion in which the density transition is low. That is, thedetermination of the halftone frequency is carried out after removingthe influence of the non-flat halftone region in which the densitytransition is high and which causes erroneous halftone frequencydetermination. In this way, accurate halftone frequency determination isattained.

Moreover, the reading property of the image reading apparatus withrespect to respective color components is, for example, a filterspectral property of the image reading apparatus (such as a scanner)with respect to the respective color component, a spectral reflectionproperty of ink with respect to the respective color component, or thelike property of the image reading apparatus. For instance, G (green)image data is theoretically consists of only magenta, which is in acomplementary color of green. However, in reality, unnecessary cyancomponent is also mixed in the G (green) image data due to the readingproperty of the image reading apparatus with respect to the document. Anextent of influence given by the cyan component is varied depending onthe reading property.

Therefore, the adjusting value is predetermined considering the extentof the influence given to the image data by the unnecessary colorcomponent other than the particular color component. The use of theadjusting value in determining the threshold value, the threshold valuedetermining section can determine the threshold value so that theinfluence given by the unnecessary color component is removed from thethreshold value.

Further, the extracting section extracts the feature of densitytransition between pixels according to the threshold value determined bythe threshold value determining section. With this, the featureextracted by the extracting section is not influenced by the unnecessarycolor component. Therefore, the halftone frequency determination basedon the particular color component can be performed by determining thehalftone frequency from the feature extracted from the extractingsection. That is, it is possible to perform highly accurate halftonefrequency determination even for the composite color halftone region.

Additional objects, features, and strengths of the present inventionwill be made clear by the description below. Further, the advantages ofthe present invention will be evident from the following explanation inreference to the drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1, which illustrates a first embodiment of the present invention,is a block diagram illustrating a halftone frequency determining sectionprovided to an image processing apparatus.

FIG. 2 is a block diagram illustrating an arrangement of the imageforming apparatus according to the present invention.

FIG. 3 is a block diagram illustrating an arrangement of an automaticdocument type estimating section provided to the image processingapparatus according to the present invention.

FIG. 4(a) is an explanatory view illustrating an example of a blockmemory for use in convolution operation for detecting a text pixel by atext pixel detecting section provided to the document type automaticdiscrimination section.

FIG. 4(b) is an explanatory view illustrating an example of a filtercoefficient for use in the convolution operation of input image data fordetecting a text pixel by the text pixel detecting section provided tothe document type automatic discrimination section.

FIG. 4(c) is an explanatory view illustrating an example of anotherfilter coefficient for use in the convolution operation of input imagedata for detecting a text pixel by the text pixel detecting sectionprovided to the document type automatic discrimination section.

FIG. 5(a) is an explanatory view illustrating an example of a densityhistogram as a result of detection of a page background pixel detectingsection provided to the document type automatic discrimination section,where the detection detects page background pixels.

FIG. 5(b) is an explanatory view illustrating an example of a densityhistogram as a result of detection of a page background pixel detectingsection provided to the document type automatic discrimination section,where the detection does not detect page background pixels.

FIG. 6(a) is an explanatory view illustrating an example of a blockmemory for use in calculation of a feature (sum of differences betweenadjacent pixels, maximum density difference) for detecting the halftonepixel by a halftone pixel detecting section provided to the documenttype automatic discrimination section.

FIG. 6(b) is an explanatory view illustrating an example of distributionof a text region, halftone region, and photo region on a two dimensionalplane whose axes are a sum of differences between adjacent pixels andmaximum density difference, which are features for detecting thehalftone pixel.

FIG. 7(a) is an explanatory view illustrating an example of the inputimage data in which a plurality of photo regions coexist.

FIG. 7(b) is an explanatory view illustrating an example of a result ofprocess performed on the example of FIG. 7(a) by a photo candidate pixellabeling section provided to the document type automatic discriminationsection.

FIG. 7(c) is an explanatory view illustrating an example of a result ofdiscrimination performed on the example FIG. 7(b) by a photo typediscrimination section provided to the document type automaticdiscrimination section.

FIG. 7(d) is an explanatory view illustrating an example of a result ofdiscrimination performed on the example of FIG. 7(b) by a photo typediscrimination section provided to the document type automaticdiscrimination section.

FIG. 8 is a flowchart illustrating a method of process of the documenttype automatic discrimination section (photo type discriminatingsection) illustrated in FIG. 3.

FIG. 9 is a flowchart illustrating a method of process of a labelingsection provided to the document type automatic discrimination sectionillustrated in FIG. 3.

FIG. 10(a) is an explanatory view illustrating an example of aprocessing method of the labeling section in case where a pixel (upsidepixel) adjacently on an upper side of a processing pixel is 1.

FIG. 10(b) is an explanatory view illustrating an example of aprocessing method of the labeling section in case where a pixeladjacently on the upper side of a processing pixel and a pixel (leftside pixel) adjacently on a left side of a processing pixel are 1 butare labeled with different labels.

FIG. 10(c) is an explanatory view illustrating an example of aprocessing method of the labeling section in case where a pixeladjacently on the upper side of a processing pixel is 0 and a pixeladjacently on a left side of a processing pixel is 1.

FIG. 10(d) is an explanatory view illustrating an example of aprocessing method of the labeling section in case where a pixeladjacently on the upper side of a processing pixel and a pixeladjacently on a left side of a processing pixel are 0.

FIG. 11 is a block diagram illustrating another arrangement of thedocument type automatic discrimination section.

FIG. 12(a) is an explanatory view illustrating halftone pixels for whichthe halftone frequency determining section performs its process.

FIG. 12(b) is an explanatory view illustrating a halftone region forwhich the halftone frequency determining section performs its process.

FIG. 13 is a flowchart illustrating a method of the process of thehalftone frequency determining section according to the firstembodiment.

FIG. 14(a) is an explanatory view illustrating an example of a 120line/inch composite color halftone consisting of magenta dots and cyandots.

FIG. 14(b) is an explanatory view illustrating G (Green) image dataobtained from the halftone of FIG. 14(a).

FIG. 15 is an explanatory view illustrating coordinates of each pixel ofa segment block illustrated in FIGS. 14(a) and 14(b).

FIG. 16(a) is a view illustrating an example of frequency distributionsof maximum transition number averages of 85 line/inch documents(“85-line/inch doc.” in drawing), 133 line/inch documents(“133-line/inch freq. doc.” in drawing), and 175-line/inch documents(“175-line/inch doc.” in drawing), where the maximum transition numberaverages are obtained only from the flat halftone regions.

FIG. 16(b) is a view illustrating an example of frequency distributionsof maximum transition number averages of 85 line/inch documents, 133line/inch documents, and 175 line/inch documents, where the maximumtransition number averages are obtained from not only the flat halftoneregions but also non-flat halftone regions.

FIG. 17 is an explanatory view illustrating density transition of asecond line from the top along a main scanning direction in FIG. 14(b),a threshold value th1 with respect to the density transition, and a mostsuitable threshold value range within which it is preferable to adjustthe threshold value th1.

FIG. 18(a) is an explanatory view illustrating binary data obtained frombinarization of the G (Green) image data illustrated in FIG. 14(b) wherea threshold value th2 is used.

FIG. 18(b) is an explanatory view illustrating binary data obtained frombinarization of the G (Green) image data illustrated in FIG. 14(b) wherea threshold value th1 is used.

FIG. 19(a) is an explanatory view illustrating an example of a 175line/inch single-color halftone.

FIG. 19(b) is an explanatory view illustrating binary data obtained frombinarization of G (Green) image data of the halftone of FIG. 19(a).

FIG. 20 is an explanatory view illustrating an example of G (Green)image data of the halftone of FIG. 14(a), where density transition ofcyan dots is not reflected.

FIG. 21(a) is an explanatory view illustrating a frequency distributionsof maximum transition number averages of binary data, making acomparison with those of the present invention illustrated in FIG.21(b).

FIG. 21(b) is an explanatory view illustrating the frequencydistributions of the maximum transition number averages of the binarydata, the frequency distributions being attained according to thepresent invention.

FIG. 22(a) is an explanatory view illustrating a filter frequencyproperty most suitable for documents with a resolution of 85 line/inch.

FIG. 22(b) is an explanatory view illustrating a filter frequencyproperty most suitable for documents with a resolution of 133 line/inch.

FIG. 22(c) is an explanatory view illustrating a filter frequencyproperty most suitable for documents with a resolution of 175 line/inch.

FIG. 23(a) is an explanatory view illustrating an example of filtercoefficients corresponding to FIG. 22(a).

FIG. 23(b) is an explanatory view illustrating an example of filtercoefficients corresponding to FIG. 22(b).

FIG. 23(c) is an explanatory view illustrating an example of filtercoefficients corresponding to FIG. 22(c).

FIG. 24(a) is an explanatory view illustrating an example of a filtercoefficient for use in a low-frequency edge filter for use in detectinga character on halftone, the low-frequency edge filter being usedaccording to the halftone frequency.

FIG. 24(b) is an explanatory view illustrating another example of afilter coefficient for use in a low-frequency edge filter for use indetecting a character on halftone, the low-frequency edge filter beingused according to the halftone frequency.

FIG. 25 is a block diagram illustrating a modification 1 of the halftonefrequency determining section of the present invention.

FIG. 26 is a flowchart illustrating a method of process of the halftonefrequency determining section as illustrated in FIG. 25.

FIG. 27 is a block diagram illustrating a modification 2 of the halftonefrequency determining section of the present invention.

FIG. 28 is a block diagram illustrating a modification 3 of the halftonefrequency determining section of the present invention.

FIG. 29 is a flowchart illustrating a method of process of the halftonefrequency determining section as illustrated in FIG. 28.

FIG. 30 is a block diagram illustrating an arrangement of an imagereading process apparatus according to a second embodiment of thepresent invention.

FIG. 31 is a block diagram illustrating an arrangement of the imageprocessing apparatus when the present invention is realized as software(application program).

FIG. 32(a) is a view illustrating an example of one line along a mainscanning direction of a segment block in a halftone region in whichdensity transition is high.

FIG. 32(b) is a view illustrating relationship between the densitytransition and a threshold value in FIG. 32(a).

FIG. 32(c) is a view illustrating binary data, which correctlyreproduces the halftone frequency of FIG. 32(a).

FIG. 32(d) is a view illustrating binary data generated using athreshold value th1 indicated FIG. 32 (b).

DESCRIPTION OF THE EMBODIMENTS First Embodiment

One embodiment of the present invention is described below referring toFIGS. 1 to 29.

<Overall Arrangement of Image Forming Apparatus>

As illustrated in FIG. 2, an image forming apparatus according to thepresent embodiment is provided with a color image input apparatus 1, animage processing apparatus 2, a color image output apparatus 3, and anoperation panel 4.

The operation panel 4 is provided with a setting key(s) for setting anoperation mode of the image forming apparatus (e.g., digital copier),ten keys, a display section (constituted by a liquid crystal displayapparatus or the like), and the like.

The color image input apparatus 1 is provided with a scanner section,for example. The color image input apparatus reads reflection image froma document via a CCD (Charge Coupled Device) as RGB analog signals (R:red; G: green; and B: blue).

The color image output apparatus 3 is an apparatus for outputting aresult of a given image process performed by the image processingapparatus 2.

The image processing apparatus 2 is provided with an A/D(analog/digital) converting section 11, a shading correction section 12,a document type automatic discrimination section 13, a halftonefrequency determining section (halftone frequency determining means) 14,an input tone correction section 15, a color correction section 16, ablack generation and under color removal section 17, a spatial filterprocess section 18, an output tone correction section 19, a tonereproduction process section 20, and a segmentation process section 21.

By the A/D converting section 11, the analog signals obtained via thecolor image input apparatus 1 are converted into digital signals.

The shading correction section 12 performs shading correction to removevarious distortions which are caused in an illumination system, focusingsystem, and/or image pickup system of the color image input apparatus 2.

By the document type automatic discrimination section 13, the RGBsignals (reflectance signals respectively regarding RGB) from which thedistortions are removed by the shading correction section 12 areconverted into signals (such as density signals) which are adopted inthe image processing apparatus 2 and easy to handle for the imageprocessing system. Further, the document type automatic discriminationsection 13 performs discrimination of the obtained document image, forexample, as to whether the document image is a text document, a printedphoto document (halftone), a photo (contone), or a text/printed photodocument (a document on which a character and a photo are printed incombination). According to the document type discrimination, thedocument type automatic discrimination section 13 outputs a documenttype signal to the input tone correction section 15, the segmentationprocess section 21, the color correction section 16, the blackgeneration and under color removal section 17, the spatial filterprocess section 18, and the tone reproduction process section 20. Thedocument type signal indicates the type of the document image. Moreover,according to the document type discrimination, the document typeautomatic discrimination section 13 outputs a halftone region signal tothe halftone frequency determining section 14. The halftone regionsignal indicates the halftone region.

The halftone frequency determining section 14 determines (i.e. findsout) the halftone frequency in the halftone region from the feature thatindicates the halftone frequency. The halftone frequency determiningsection 14 will be described later.

The input tone correction section 15 performs image quality adjustmentprocess according to the discrimination made by the document typeautomatic discrimination section 13. Examples of the image qualityadjustment process include: omission of page background region density,contrast adjustment, etc.

Based on the discrimination made by the document type automaticdiscrimination section 13, the segmentation process section 21 performssegmentation to discriminate the pixel in question as to whether thepixel in question is in a text region, a halftone region, a photo region(or another region). Based on the segmentation, the segmentation processsection 21 outputs a segmentation class signal to the color correctionsection 16, the black generation and under color removal section 17, thespatial filter process section 18, and the tone reproduction processsection 20. The segmentation class signal indicates to which type ofregion each pixel belongs.

In order to realize accurate color reproduction, the color correctionsection 16 performs color correction process for eliminating colorimpurity including components unnecessarily absorbed due to spectralcharacteristics of CMY (C: Cyan, M: Magenta, Y: Yellow) color materialsthat include unnecessary absorption components.

The black generation and under color removal section 17 performs blackgenerating process to generate a black (K) signal from the three CMYcolor signals subjected to the color correction, and performs pagebackground color removal process to remove from the CMY signal the Ksignal obtained by the black generating, thereby to obtain new CMYsignals. As a result of the processes (black generating process and pagebackground color removal process), the three colors signals areconverted into four CMYK color signals.

The spatial filter process section 18 performs spatial filter processusing a digital filter. The spatial filter process corrects spatialfrequency property thereby to prevent blurring of output image andgraininess deterioration.

The output tone correction section 19 performs output tone correctionprocess to convert the signals such as the density signal into ahalftone region ratio, which is a property of the image outputapparatus.

The tone reproduction process section 20 performs tone reproductionprocess (intermediate tone generation process). The tone reproductionprocess decomposes the image into pixels and makes it possible toreproduce tones of the pixels.

An image region extracted as a black character, or as a color characterin some cases, by the segmentation process section 21 is subjected tosharpness enhancement process performed by the spatial filter processsection 18 to enhance the high halftone frequency thereby to be able toreproduce the black character or the color character with higherreproduction quality. In performing the above process, the spatialfilter process section 18 performs the process based on the halftonefrequency determination signal sent thereto from the halftone frequencydetermining section 14. This will be discussed later. In theintermediate tone generating process, binarization or multivaluingprocess for a high resolution screen suitable for reproducing the highhalftone frequency is selected.

On the other hand, the region judged as being of the halftone by thesegmentation process section 21 is subjected to a low-pass filterprocess by the spatial filter process section 18 to remove inputhalftone component. The spatial filter process section 18 performs thelow-pass filter process based on the halftone frequency determinationsignal sent thereto from the halftone frequency determining section 14.This process will be described later. Moreover, in the intermediate tonegenerating process, the binarization or multivaluing process for ascreen for high tone reproduction quality is performed.

In the region segmented as a photo by the segmentation process section21, the binarization or multivaluing process for a screen for high tonereproduction quality is performed.

The image date subjected to the above-mentioned processes is storedtemporally in storage means (not illustrated) and read out to the colorimage output apparatus 3 at a predetermined timing. The above-mentionedprocesses are carried out by a CPU (Central Processing Unit).

The color image output apparatus 3 outputs the image data on a recordingmedium (for example, paper or the like). The color image outputapparatus 3 is not particularly limited. For example, the color imageoutput apparatus 3 may be an electronic photographic color image formingapparatus, an ink-jet color image forming apparatus, or the like.

The document type automatic discrimination section 13 is not inevitablynecessary. The halftone frequency determining section 14 may be used inlieu of the document type automatic discrimination section 13. In thisarrangement, pre-scanned image data or image data that has beensubjected to the shading correction is stored in a memory such as a harddisc or the like. The judgment whether or not the image data includes ahalftone region is made by using the stored image data, and thedetermination of the halftone frequency is carried out based on thejudgment.

<Document Type Automatic Discrimination Section>

Next, the image process performed by the document type automaticdiscrimination section 13 is described, the image process being fordetecting the halftone region which is to be subjected to the halftonefrequency determination process.

As illustrated in FIG. 3, the document type automatic discriminationsection 13 is provided with a text pixel detecting section 31, a pagebackground pixel detecting section 32, a halftone pixel detectingsection 33, a photo candidate pixel detecting section 34, a photocandidate pixel labeling section 35, a photo candidate pixel countingsection 36, a halftone pixel counting section 37, and a photo typediscrimination section 38. Even though the following explains the imageprocess referring to a case where CMY signals obtained by complementarycolor transformation of RGB signals are used, the image process may bearranged such that the RGB signals are used.

The text pixel detecting section 31 outputs a discriminating signal thatindicates whether or not a given pixel in the input image data is in acharacter edge region. An example of the process of the text pixeldetecting section is process using the following convolution operationresults S1 and S2. The convolution operation results S1 and S2 isobtained by convolution operation of input image data (f(0,0) to f(2,2),which are respectively pixel densities of input image data) by usingfilter coefficients as illustrated in FIGS. 4(b) and 4(c), the inputimage data being stored in a block memory as illustrated in FIG. 4(a).S1=1×f(0,0)+2×f(0,1)+1×f(0,2)−1×f(2,0)−2×f(2,1)−1×f(2,2)S2=1×f(1,0)+2×f(1,0)+1×f(2,0)−1×f(0,2)−2×f(1,2)−1×f(2,2)S=√{square root over (S1+S2)}

If S was greater than a predetermined threshold value, a processingpixel (coordinates (1,1)) in the input image data stored in the blockmemory would be recognized as a text pixel present in the character edgeregion. All the pixels in the input image data is subjected to thisprocess, thereby discriminating the text pixels in the input image data.

The page background pixel detecting section 32 outputs a discriminatingsignal that indicates whether or not a given pixel in the input imagedata is in the page background region. An example of the process of thepage background pixel detecting section 32 is process using a densityhistogram as illustrated in FIG. 5. The density histogram indicates apixel density (e.g. of the M signal of the CMY signals obtained bycomplementary color reversion) in the input image data.

In the following, the process steps are explained specifically referringto FIGS. 5(a) and 5(b).

-   Step 1: Find a maximum frequency (Fmax).-   Step 2: If the Fmax is smaller than the predetermined threshold    value (THbg), it is judged that the input image data includes no    page background region.-   Step 3: If the Fmax is equal to or greater than the predetermined    threshold value (THbg), and if a sum of the Fmax and a frequency of    a pixel density close to a pixel density (Dmax) which gives the Fmax    is greater than the predetermined threshold value, it is judged that    the input image data includes a page background region. (For    example, the frequency of the pixel density close to the pixel    density (Dmax) may be, e.g., Fn1 and Fn2 (meshing portions in FIG.    5(a)) where Fn1 and Fn2 are frequencies of pixel densities Dmax−1    and Dmax+1).-   Step 4: If it is judged in Step 3 that the input image data includes    the page background region, pixels having pixel densities in a    vicinity of the Dmax, e.g., Dmax−5 to Dmax+5 are recognized as page    background pixels.

The density histogram may be a simple density histogram in which densityclasses (e.g., 16 classes in which the 256 levels of pixel densities aredivided) are used instead of individual pixel densities. Alternatively,a luminance histogram of luminance Y obtained by the following equationmay be used.Y _(j)=0.30R _(j)+0.59G _(j)+0.11B _(j)

Y_(j): luminance of processing pixel,

R_(j), G_(j), B_(j): color components of processing pixel

The halftone pixel detecting section 33 outputs a discriminating signalthat indicates whether or not a given pixel in the input image data isin the halftone region. An example of the process of the halftone pixeldetecting section 33 is process using adjacent pixel difference sum Busy(which is a sum of differences of adjacent pixels) and a maximum densitydifference MD with respect to the input image data stored in the a blockmemory as illustrated in FIG. 6(a). In FIG. 6(a), (f(0,0) to f(4,4))represent pixel densities of the input image data. The adjacent pixeldifference sum Busy and a maximum density difference MD are described asfollows: $\begin{matrix}{{{Busy}\quad 1} = {\sum\limits_{i,j}{{{f( {i,j} )} - {f( {i,{j + 1}} )}}}}} & ( {{0 \leq i \leq 5},{0 \leq j \leq 4}} ) \\{{{Busy}\quad 2} = {\sum\limits_{i,j}{{{f( {i,j} )} - {f( {{i + 1},j} )}}}}} & ( {{0 \leq i \leq 4},{0 \leq j \leq 5}} )\end{matrix}$

-   -   Busy=max(busy1,busy2)    -   MaxD: Maximum of f(0,0) to f(4,4)    -   MinD: Minimum of f(0,0) to f(4,4)    -   MD=MaxD−MinD

Here, the Busy and MD are used to judge whether or not a processingpixel (coordinates (2,2)) is a halftone pixel present in the halftoneregion.

On a two dimensional plane in which the Busy and MD are the axes, thehalftone pixels are distributed differently from pixels located in theother regions (such as text and photo), as illustrated in FIG. 6(b).Therefore, the judgment whether or not the processing pixel in the inputimage data is present in the halftone region is carried out by thresholdvalue process regarding the Busy and MD calculated respectively for theindividual processing pixels, using border lines (broken lines)indicated in FIG. 6(b) as threshold values.

An example of the threshold value process is given below.

Judge as halftone region if MD≦70 and Busy>2000

Judge as halftone region if MD>70 and MD≦Busy

By performing the above process for all the pixels in the input imagedata, it is possible to discriminate the halftone pixels in the inputimage data.

The photo candidate pixel detecting section 34 outputs a discriminationsignal that indicates whether a given pixel is present in the photocandidate pixel region. For example, recognized as a photo candidatepixel is a pixel other than the text pixel recognized by the text pixeldetecting section 31 and the page background pixel recognized by thepage background pixel detecting section 32.

For input image data including a plurality of photo portions asillustrated in FIG. 7(a), the photo candidate pixel labeling section 35performs labeling process with respect to a plurality of photo candidateregions that consist of photo candidate pixels discriminated by thephoto candidate pixel detecting section 34. For instance, the pluralityof photo candidate regions are labeled as a photo candidate region (1)and a photo candidate region (2) as illustrated in FIG. 7(b). Thisallows recognizing each photo candidate region individually. Here, forexample, the photo candidate region is recognized as “1”, while otherregions are recognized as “0”, and the labeling process is carried outper pixel. The labeling process will be described later.

The photo candidate pixel counting section 36 counts up pixels includedin the respective photo candidate regions labeled by the photo candidatepixel labeling section 35.

The halftone pixel counting section 37 counts up pixels in the halftoneregions (recognized by the halftone pixel detecting section 33) in therespective photo candidate regions labeled by the photo candidate pixellabeling section 35. For example, the halftone pixel counting section 37gives a pixel number Ns1 by counting pixels consisting the halftoneregion (halftone region (1)) located in the photo candidate region (1)and a pixel number Ns2 by counting pixels consisting the halftone region(halftone region (2)) located in the photo candidate region (2).

The photo type discrimination section 38 judges whether the respectivephoto candidate regions are a printed photo (halftone region), photo(contone region) or printer-outputted photo (which is outputted (formed)by using a laser beam printer, ink-jet printer, thermal transfer printeror the like). For example, as illustrated in FIGS. 7(c) and 7(d), thisdiscrimination is made by the following conditional equation using thephoto candidate pixel number Np, the halftone pixel number Ns, andpredetermined threshold values THr1 and THr2:If Ns/Np>THr1, judge as printed photo (halftone)   Condition 1:If Thr1≦Ns/Np≦THr2, Judge as printer-output photo   Condition 2:If Ns/Np<Thr2, judge as photo (contone)   Condition 3:

The threshold values may be THr1=0.7 and THr2=0.3, for example.

Moreover, the discrimination result may be outputted per pixel, perregion, or per document. Moreover, even though in the exemplary processthe discrimination as to types regards photos, the discrimination mayregards any type of document components such as graphic images, graphs,etc., except the characters and page background. Moreover, the phototype discrimination section 38 may be arranged to control switching-overof contents of the processes of the color correction section 16, thespatial filter process section 18, and the like based on a comparisonbetween (a) a ratio of the halftone pixel number Ns to the photocandidate pixel number Np and (b) a predetermined threshold value,instead of judging whether the photo candidate region is a printedphoto, a printer-outputted photo, or a photo.

In FIG. 7(c), the photo candidate region (1) is judged as a printedphoto because the photo candidate region (1) satisfies the condition 1,whereas the photo candidate region (2) is judged as a printer-outputphoto region because the photo candidate region (2) satisfies thecondition 2. In FIG. 7(d), the photo candidate region (1) is judged as aphoto because the photo candidate region (1) satisfies the condition 3,whereas the photo candidate region (2) is judged as a printer-outputphoto region because the photo candidate region (2) satisfies thecondition 2.

In the following, a method of an image type determining processperformed by the document type automatic discrimination section 13having the above arrangement is described referring to a flowchartillustrated in FIG. 8.

Firstly, based on the RGB density signals obtained by conversion of RGBsignals (RGB reflectance signals) from which various distortions havebeen removed by the shading correction section 12 (see FIG. 2), the textpixel detecting process (S11), the page background pixel detectingprocess (S12), and the halftone pixel detecting process (S13) areperformed in parallel. Here, the text pixel detecting process is carriedout by the text pixel detecting section 31, the page background pixeldetecting process is carried out by the page background pixel detectingsection 32, and the halftone pixel detecting process is carried out bythe halftone pixel detecting section 33. Therefore, detailed explanationof these processes is omitted here.

Next, based on results of the text pixel detecting process and the pagebackground pixel detecting process, a photo candidate pixel detectingprocess is carried out (S14). The photo candidate pixel detectingprocess is carried out by the photo candidate pixel detecting section34. Therefore, detailed explanation of this process is omitted here.

Next, the labeling process is carried out with respect to the detectedphoto candidate pixel (S15). The labeling process will be describedlater.

Then, based on a result of the labeling process, the photo candidatepixels are counted to obtain the photo candidate pixel number Np (S16).This counting is carried out by the photo candidate pixel countingsection 36. Therefore, detailed explanation is omitted here.

In parallel with the processes S11 to S16, the halftone pixels arecounted to obtain the halftone pixel number Ns based on a result of thehalftone pixel detecting process at S13 (S17). This counting is carriedout by the halftone pixel counting section 37. Therefore, detailedexplanation of this process is omitted here.

Next, based on the photo candidate pixel number Np obtained at S16 andthe halftone pixel number Ns obtained at S17, a ratio of the halftonepixel number Ns to the photo candidate pixel number Np (i.e. Ns/Np) iscalculated out (S18).

Then, from Ns/Np obtained at S18, the photo candidate region is judgedwhether it is a printed photo, a printer-outputted photo, or a photo(S19).

The processes at S18 and S19 are carried out by the photo typediscrimination section 38. Therefore, detailed explanation on theseprocesses is omitted here.

In the following, the labeling process is described.

In general, the labeling process is a process to label a cluster ofequivalent and continuous foreground pixels (=1) with a label likewise,and label a cluster of other equivalent and continuous foreground pixelswith a different label likewise. (see Image process standard text bookof CG-APTS, p. 262 to 268). Various kinds of labeling process have beenproposed. In the present embodiment, a labeling system in which scanningis carried out twice is employed. A method of the labeling process isdescribed below referring to a flowchart illustrated in FIG. 9.

To begin with, values of pixels are measured from an uppermost andleftmost pixel in a raster scanning order (S21). If the value of aprocessing pixel=1, it is judged that whether or not a pixel (upsidepixel) adjacently on an upper side of the processing pixel is 1 andwhether or not a pixel (left side pixel) adjacently on a left side ofthe processing pixel is 0 (S22).

Here, if the pixel adjacently on the upper side of the processingpixel=1 and the pixel adjacently on the left side of the processingpixel=0 at S22, procedure 1 is carried out. The procedure 1 is asfollows.

Procedure 1: As illustrated in FIG. 10(a), if the processing pixel=1,and if the pixel adjacently on the upper side thereof is labeled with alabel (A), the processing pixel is labeled with the label (A) likewise(S23). Then, the process goes to S29, at which it is judged whether allthe pixels are labeled or not. If all the pixels are labeled at S29, theprocess goes to S16 (illustrated in FIG. 8) at which the counting toobtain the photo candidate pixel number Np is carried out for everyphoto candidate region.

Moreover, if the pixel adjacently on the upper side of the processingpixel=1 and the pixel adjacently on the left side of the processingpixel≠#0 at S22, it is judged whether the pixel adjacently on the leftside of the processing pixel is 1 or not (S24).

Here, if the pixel adjacently on the upper side of the processingpixel=0 and the pixel adjacently on the left side of the processingpixel=1 at S24, procedure 2 is carried out. The procedure 2 is asfollows.

Procedure 2: as illustrated in FIG. 10(c), if the pixel adjacently onthe upper side thereof=0 and the pixel adjacently on the left sidethereof=1, the processing pixel is labeled with the label (A) likewisewith the pixel adjacently on the left side thereof (S25). Then, theprocess moves to S29, at which it is judged whether all the pixels arelabeled or not. If all the pixels are labeled at S29, the processes goesto S16 (illustrated in FIG. 8) at which the counting to obtain the photocandidate pixel number Np is carried out for every photo candidateregion.

Moreover, if the pixel adjacently on the upper side of the processingpixel≠0 and the pixel adjacently on the left side of the processingpixel≠1 at S24, it is judged whether or not the pixel adjacently on theupper side of the processing pixel=1 and whether or not the pixeladjacently on the left side of the processing pixel=1 (S26).

If the pixel adjacently on the upper side of the processing pixel=1 andthe pixel adjacently on the left side of the processing pixel=1 at S26,procedure 3 is carried out. The procedure 3 is as follows.

Procedure 3: As illustrated in FIG. 10(b), if the pixel adjacently onthe left side thereof is also “1” and is labeled with a label (B)unlikewise with the pixel adjacently on the upper side of the processingpixel, the processing pixel is labeled with the label (A) likewise withthe pixel adjacently on the upper side thereof, while keepingcorrelation between the label (B) of the pixel adjacently on the leftside thereof and the label (A) of the pixel adjacently on the upper sidethereof (S27). Then, the process moves to S29, at which it is judgedwhether all the pixels are labeled or not. If all the pixels are labeledat S29, the process goes to S16 (illustrated in FIG. 8) at which thecounting to obtain the photo candidate pixel number Np is carried outfor every photo candidate region.

Further, if the pixel adjacently on the upper side of the processingpixel≠1 and the pixel adjacently on the left side of the processingpixel≠1 at S26, procedure 4 is carried out. The procedure 4 is asfollows:

Procedure 4: As illustrated in FIG. 10(d), if both the pixels adjacentlyon the upper side and on the left side thereof=0, the processing pixelis labeled with a new label (C) (S28). Then, the process moves to S29,at which it is judged whether all the pixels are labeled or not. If allthe pixels are labeled at S29, the process goes to S16 (illustrated inFIG. 8) at which the counting to obtain the photo candidate pixel numberNp is carried out for every photo candidate region.

In the case where plural kinds of labels are used to label the pixels,the above-mentioned rule is applied so that like pixels are labeled witha label likewise.

Moreover, the arrangement illustrated in FIG. 3 may be arranged not onlyto discriminate the photo regions, but also to discriminate the type ofthe whole image. In this case, the arrangement illustrated in FIG. 3 isprovided with an image type discrimination section 39 in the downstreamof the photo type discrimination section 38 (see FIG. 11). The imagetype discrimination section 39 finds a ratio Nt/Na (which is a ratio ofthe text pixel number to total number of the pixels), a ratio (Np−Ns)/Na(which is a ratio of a difference between the photo candidate pixelnumber and halftone pixel number to the total number of the pixels), anda ratio Ns/Na (which is a ratio of the halftone pixel number to thetotal number of the pixels), and compares these ratios respectively withpredetermined threshold values THt, THp, and THs. Based on thecomparisons and the result of the process of the photo typediscrimination section 38, the image type discrimination section 39performs the discrimination with respect to the whole image to find thetype of the image overall. For example, if the ratio Nt/Na is equal toor more than the threshold value, and if the photo type discriminationsection 38 judges that the document is a printer-output photo, the imagetype discrimination section 39 judges that the document is a document onwhich text and printer-outputted photo coexist.

<Halftone Frequency Determining Section>

The following describes the image process (halftone frequencydetermining process) performed by the halftone frequency determiningsection (halftone frequency determining means) 14. The halftonefrequency determining process is a characteristic feature of the presentembodiment.

The process performed by the halftone frequency determining section 14is carried out only with respect to the halftone pixels (see FIG. 12(a))detected during the process of the document type automaticdiscrimination section 13 or the halftone region (see FIG. 12(b))detected by the document type automatic discrimination section 13. Thehalftone pixels illustrated in FIG. 12(a) corresponds to the halftoneregion (1) illustrated in FIG. 7(b), and the halftone region illustratedin FIG. 12(b) corresponds to the printed photo (halftone) regionillustrated in FIG. 7(c).

The halftone frequency determining section 14 is, as illustrated in FIG.1, provided with a color component selecting section 40, flat halftonediscriminating section (flat halftone discriminating means) 41, athreshold value setting section (threshold value determining means) 42,a threshold value adjusting section (threshold value determining means)43, a binarization section (extracting means, binarization means) 44, amaximum transition number calculating section (extracting means,transition number calculating means) 45, a maximum transition numberaveraging section (extracting means, transition number extracting means)46, and a halftone frequency estimating section (halftone frequencyoperating means) 47.

These sections perform their processes per segment block which isconstituted of the processing pixel and pixels nearby the processingpixel and which has a size of M pixel×N pixel where M and N are integerspredetermined experimentally. These sections output their results perpixel or per segment block.

The color component selecting section 40 finds respective sums ofdensity differences for the respective RGB components (Hereinafter, thesums of the density differences are referred to as “busyness”). By thecolor component selecting section 40, image data having a colorcomponent having a largest busyness among them is selected as image datato be outputted to the flat halftone discriminating 41, the thresholdvalue setting section 42, the threshold value adjusting section 43, andthe binarization section 44. Moreover, the color component selectingsection 40 outputs, to the threshold value adjusting section 43, aselected color component signal which indicates which color component isselected.

The flat halftone discriminating section 41 performs discrimination ofthe segment blocks as to whether the respective segment blocks are inflat halftone or in non-flat halftone. The flat halftone is a halftonein which density transition is low. The non-flat halftone is a halftonein which density transition is high. The flat halftone discriminatingsection 41 calculates out a absolute difference sum subm1, a absolutedifference sum subm2, a absolute difference sum subs1, and an absolutedifference sum subs2 in a given segment block. The absolute differencesum subm1 is a sum of absolutes of differences between adjacent pairs ofpixels the right one of which is greater in density than the left one.The absolute difference sum subm2 is a sum of absolutes of differencesbetween adjacent pairs of pixels the right one of which is less indensity than the left one. The absolute difference sum subs1 is a sum ofabsolutes of differences between adjacent pairs of pixels the upper oneof which is greater in density than the lower one. The absolutedifference sum subs2 is a sum of absolutes of differences betweenadjacent pairs of pixels the upper one of which is less in density thanthe lower one. Moreover, the flat halftone discriminating section 41finds busy and busy_sub from Equation (1), and judges that the segmentblock is a flat halftone portion, if the obtained busy and busy_subsatisfy Equation (2). TH pair in Equation (2) is a value predeterminedvia experiment. Further, the flat halftone discriminating section 41outputs a flat halftone discrimination signal flat (a flat halftonediscrimination signal flat of 1 indicates flat halftone, whereas a flathalftone discrimination signal flat of 0 indicates non-flat halftone).$\begin{matrix} \begin{matrix}{{If}\quad\underset{\underset{{busy\_ sub} = {{{{subm}\quad 1} - {{subm}\quad 2}}}}{{busy} = {{{sub}\quad m\quad 1} + {{subm}\quad 2}}}}{{{{{subm}\quad 1} - {{subm}\quad 2}}} > {{{{subs}\quad 1} - {{subs}\quad 2}}}}} \\{{If}\quad\underset{\underset{{busy\_ sub} = {{{{subs}\quad 1} - {subs2}}}}{{busy} = {{{subs}\quad 1} + {{subs}\quad 2}}}}{{{{{subm}\quad 1} - {{subm}\quad 2}}} \leq {{{{subs}\quad 1} - {{subs}\quad 2}}}}}\end{matrix} \} & {{Equation}\quad 1} \\{{{busy\_ sub}/{busy}} < {THpair}} & {{Equation}\quad 2}\end{matrix}$

From the image data of the color component selected by the colorcomponent selecting section 40, the threshold value setting section 42calculates out an average density ave of pixels in a segment block.Then, the threshold value setting section 42 sets the average densityave as a threshold value th1. The threshold value th1 is used to obtaina final threshold value th2 to be used in the binarization of thesegment block.

The threshold value adjusting section 43 calculates out a maximumdensity difference msub as density information of the segment block.Then, the threshold value adjusting section 43 adjusts the thresholdvalue th1, using the following equations (3), based on the thresholdvalue th1 set by the threshold value setting section 42, the averagedensity ave, and the maximum density difference msub, thereby to obtainthe final threshold value th2. The threshold value adjustment performedby the threshold value adjusting section 43 is to prevent thebinarization section 44 from extracting an unnecessary color except thecolor component selected by the color component selecting section 40.if ave>thave, th2=th1−msub×c1−c2, andif not, th2=th1+msub×c1+c2   Equation (3)

In the equations, thave, c1, and c2 (where c1 and c2 are adjustingvalues) are optimum values that are set in consideration of readingproperties of the color image input apparatus 1 for the respective colorcomponents. The optimum values thave, c1, and c2 are obtained viaexperiment respectively for R, G, B components. The threshold valueadjusting section 43 stores therein thave, c1, and c2, which arepredetermined respectively for each color component. The threshold valueadjusting section 43 uses thave, c1, and c2 that correspond to the colorcomponent indicated by the selection color component signal sent theretofrom the color component selecting section 40. How to obtain thave, c1,and c2 will be described later.

The binarization section 44 prepares binary data via binarization of theimage data of the selected color component as to the pixels of thesegment block. In the binarization performed the binarization section44, the final threshold value th2 obtained by the threshold valueadjusting section 43 is used.

The maximum transition number calculating section 45 calculates out amaximum transition number of the segment block from a transition number(m rev) of the binary data obtained from main scanning lines and subscanning lines, i.e., how many times the binary data, obtained from mainscanning lines and sub scanning lines, is switched over.

The maximum transition number averaging section 46 calculates out anaverage m rev_ave of the transition numbers (m rev) of all those segmentblocks in the halftone region for which the flat halftone discriminationsignal outputted from the flat halftone discriminating section 41 is 1,the transition numbers (m rev) having been calculated out by the maximumtransition number calculating section 45. The transition number and theflat halftone discrimination signal obtained for each segment block maybe stored in the maximum transition number averaging section 46 or maybe stored in a memory provided in addition.

The halftone frequency estimating section 47 estimates the frequency ofthe input image by comparing (a) the maximum transition number average mrev_ave calculated by the maximum transition number averaging section 46with (b) theoretical maximum transition numbers predetermined forhalftone documents (printed photo document) of respective frequencies.For example, a 120 line/inch document theoretically has a maximumtransition number of 6 to 8, whereas a 175 line/inch documenttheoretically has a maximum transition number of 10 to 12. The halftonefrequency estimating section 46 outputs a halftone frequencydiscrimination signal, which indicates the determined (i.e., found-out)halftone frequency.

In the following, a method of the halftone frequency determining processof the halftone frequency determining section 14 having the abovearrangement is described below referring to a flowchart illustrated inFIG. 13.

To begin with, as to the halftone pixel or segment block of the halftoneregion, which is detected by the document type automatic discriminationsection 13, the color component selecting section 40 selects the colorcomponent having the largest busyness (S31). Moreover, the colorcomponent selecting section 40 outputs to the threshold value adjustingsection 43 a selected color component signal, which indicates a selectedcolor component.

Next, for the segment block, the threshold value setting section 42calculates out the average density ave of the color component selectedby the color component selecting section 40, and sets the averagedensity ave as the threshold value th1 (S32).

Then, the threshold value adjusting section 43 calculates out a maximumdensity difference msub in the selected color component in the segmentblock (S33). After that, the threshold value adjusting section 43calculates out the final threshold value th2 by adjusting the thresholdvalue th1 according to Equations (3), using the thave, c1, and c2 thatcorrespond to the selected color component signal outputted thereto fromthe color component selecting section 40 (S34).

Then, the binarization section 44 performs the binarization of thepixels of the segment block, referring to the final threshold value th2obtain by using the threshold value adjusting section 43 (S35).

After that, the maximum transition number calculating section 45calculates out (finds out) the maximum transition number in the segmentblock (S36).

In parallel with S32 to S35, the flat halftone discriminating section 41performs the flat halftone discriminating process for discriminatingwhether the segment block is in halftone or in non-halftone, and outputsthe flat halftone discrimination signal flat to the maximum transitionnumber averaging section 46 (S37).

Then, it is judged whether or not the processes are done for all thesegment blocks (S38). If not, the processes of S31 to S37 are repeatedfor a segment block to be processed next.

If the processes are done for all the segment blocks, the maximumtransition number averaging section 46 calculates out the average of themaximum transition numbers, calculated at S37, of all those segmentblocks in the halftone region for which the flat halftone discriminationsignal flat is 1 (S39).

Then, based on the maximum transition number average calculated out bythe maximum transition number averaging section 46, the halftonefrequency estimating section 47 estimates the halftone frequency of thehalftone region (S40). Then, the halftone frequency estimating section47 outputs the halftone frequency determination signal that indicatesthe halftone frequency determined by its estimation. By this, thehalftone frequency determining process is completed.

Next, a concrete example of the processes dealing with actual image dataand its effect are explained below. Here, it is assumed that the segmentblock is in size of 10×10 pixels.

FIG. 14(a) illustrates an example of a halftone of 120 line/inch incomposite color, consisting of magenta dots and cyan dots. If the inputimage is in composite color halftone, it is desirable that, among CMY ineach segment block, only the color having a larger density change(busyness) than the rest be taken into consideration and the halftonefrequency of the color be used for determining the halftone frequency ofthe document. Further, it is desirable that dots of the color having thelarger density transition than the rest are processed by using a channel(signal of the input image data) most suitable for representing thedensity of the dots of the color. Specifically, for a composite colorhalftone consisted mainly of magenta dots as illustrated in FIG. 14(a),G (green) image (complementary color for magenta) is used, which is mostsuitable for processing magenta. This makes it possible to performhalftone frequency determining process which is based on substantiallyonly the magenta dots. In the segment block as illustrated in FIG.14(a), G (Green) image data is the image data having the larger busynessthan the other image data. Thus, the color component selecting section40 selects the G (Green) image data as image data to be outputted to theflat halftone discriminating section 41, the threshold value settingsection 42, the threshold value adjusting section 43, and thebinarization section 44.

FIG. 14(b) is a view illustrating density of G (Green) image data ineach pixel in the segment block illustrated in FIG. 14(a). In FIG.14(b), the density “0” represents black and the density “255” representswhite. The flat halftone discriminating section 41 subjects the G(Green) image data as illustrated in FIG. 14(b) to the followingprocess.

FIG. 15 illustrates coordinates of each pixel in the segment blockillustrated in FIG. 14.

For each line in the main scanning direction, the absolute differencesum subm1(i), which is the sum of the absolute differences in pixelvalue between density of a pair of adjacent pixels the right one ofwhich is greater in density than the left one, is calculated as follows.Here, the calculation for the second line from the top is explained byway of example. In the second line, the pairs of the coordinates (1,1)and (1,2), (1,2) and (1,3), (1,4) and (1,5), and (1,8) and (1,9) aresuch pairs of adjacent pixels, the right one of which is greater indensity than the left one. Hence, the absolute difference sum subm1(1)is as follows:subm1(1)=|70−40|+|150−70|+|170−140|+|140−40|=240,where subm1(i) represents the subm1 at a sub-scanning directioncoordinates i.

For each line in the main scanning direction, the absolute differencesum subm2(i), which is the sum of the absolute differences in pixelvalue between density of a pair of adjacent pixels, the right one ofwhich is less in density than (or equal in density to) the left one, iscalculated as follows. Here, the calculation for the second line fromthe top is explained by way of example. In the second line, the pairs ofthe coordinates (1,0) and (1,1), (1,3) and (1,4), (1,6) and (1,7), and(1,7) and (1,8) are such pairs of adjacent pixels, the right one ofwhich is less in density than (or equal in density to) the left one.Hence, the absolute difference sum subm2(1) is as follows:subm2(1)=|40−140|+|140−150|+|150−170|+|40−40|=240,where subm2(i) represents the subm2 at a sub-scanning directioncoordinates i.

From the following equation using subm1(0) to subm1(9) and subm2(0) tosubm2(9) calculated in the same manner, subm1, subm2, busy, busy_sub arecalculated out. $\begin{matrix}{{{subm}\quad 1} = {\sum\limits_{i = 0}^{9}{{subm}\quad 1(i)}}} \\{= 1610}\end{matrix}$ $\begin{matrix}{{{subm}\quad 2} = {\sum\limits_{i = 0}^{9}{{subm}\quad 2(i)}}} \\{= 1470}\end{matrix}$

With respect to the sub-scanning direction, the G (Green) image dataillustrated in FIG. 14(b) is subjected to a process similar to theprocess for the main scanning direction, thereby to calculate out thatsubs1 is 1520 and subs2 is 1950.

The obtained subm1, subm2, subs1, subs2 satisfy|subm1−subm2|≦|subs1−subs2| when applied to Equation 1. From this, it isfound that busy=3470 and busy_sub=430. When the busy and busy_subobtained are applied to Equation 2 using the predetermined THpair(=0.3), the following is obtained:busy_sub/busy=0.12

As understood from the above, Equation 2 is satisfied. Accordingly, theflat halftone discrimination signal flat of 1, which indicates that thesegment block illustrated in FIG. 14(b) is in flat halftone, isoutputted to the maximum transition number averaging section 46. Then,the maximum transition number averaging section 46 calculates out themaximum transition number average per segment block of flat halftone.

As described above, for a segment block of the non-flat halftone portion(e.g., see FIG. 32(a)) in which the density transition is high, thethreshold value is a single threshold value for the segment block, nomatter how the threshold value is set, for example, even if thethreshold value is th1, th2 a, or th2 b illustrated in FIG. 32(b). Thus,if the segment block was of the non-flat halftone portion, thecalculated transition number would be much smaller than the transitionnumber that is supposed to be calculated out. For example, even if th1,th2 a, th2 b illustrated in FIG. 32(b) were set as threshold values, thecalculated transition number would be much smaller than the transitionnumber that is supposed to be calculated out. Specifically, asillustrated in FIG. 32(c) in which binary data correctly reproducing thehalftone frequency is illustrated, the transition number that issupposed to be calculated out is 6. However, in FIG. 32(d) in which thebinary data obtained from FIG. 32(a) using the threshold value th1, th2a, and th2 b, the transition number is 2. Therefore, the calculatedtransition number is much smaller than the transition number that issupposed to be calculated out. This would deteriorate the halftonefrequency determination accuracy.

FIG. 16(b) gives an example of frequency distributions of maximumtransition number averages of 85 line/inch documents, 133 line/inchdocuments, and 175 line/inch documents. In the example illustrated inFIG. 16(b), not only the flat halftone region in which the densitytransition is low, but also the non-flat halftone region in which thedensity transition is high is used. The binarization process of ahalftone region in which the density transition is high cannot extractthe black pixel portions (that indicate the halftone portions) asillustrated in FIG. 32(c) but discriminates the white pixel portion(that indicates a low density halftone portion) and the black pixelportion (that indicates a high density halftone portion) as illustratedin FIG. 32(d). As a result, the calculated transition number is toosmall for the halftone frequency that correctly represents the halftonein question. This increases a number of the input images in which themaximum transition number average is smaller than in the case where thecalculation is done with respect to only the flat halftone region,thereby extending the distribution of the maximum transition numberaverages of halftones of each halftone frequency in the smallerdirection. Consequently, the frequency distributions overlap each other,whereby the halftone frequencies in portions of the document whichcorrespond to the overlapping cannot be determined accurately.

However, according to the halftone frequency determining section 14 ofthe present embodiment, the flat halftone discrimination section 41performs discrimination of the segment blocks as to whether a segmentblock is the flat halftone portion. Then, the maximum transition numberaveraging section 46 calculates out an average only from the transitionnumbers of those segment blocks which are discriminated as the flathalftone portion.

FIG. 16(a) gives an example of frequency distributions of maximumtransition number averages of 85 line/inch documents, 133 line/inchdocuments, and 175 line/inch documents. In the example illustrated inFIG. 16(a), only the flat halftone region in which the densitytransition is low is used. By using the flat halftone region in whichthe density transition is low, it is possible to generate binary datathat reproduces the halftone frequency accurately. Thus, halftonefrequencies have different maximum transition number averages, therebyeliminating, or reducing, the overlapping of the frequency distributionsof the halftone frequencies. This makes it possible to attain higherhalftone frequency determination accuracy.

In parallel with the process of the halftone determining section 14, thethreshold value setting section 42, the threshold value adjustingsection 43, the binarization section 44, and the maximum transitionnumber calculating section 45 perform the following processes withrespect to the G (Green) image data illustrated in FIG. 14(b).

With respect to the G (Green) image data as illustrated in FIG. 14(b),the threshold value setting section 42 sets the average pixel densityvalue ave (=138) as the threshold value th1.

The threshold value adjusting section 43 adjusts the threshold value th1thereby to obtain the final threshold value th2. This adjustment aims toattain such binarization that allows extracting only the dots in thecolor component in question to be counted for obtaining the transitionnumber thereof (that is, the color component selected by the colorcomponent selecting section 40). In the case discussed here, theadjustment aims to attain such binarization that allows extracting onlythe magenta dots.

FIG. 17 illustrates density transition along a second line in the mainscanning direction from the top in FIG. 14(b), the threshold value th1for the density transition, and an optimal threshold value range withinwhich the threshold value th1 is preferably adjusted. Here, if thethreshold value th1 is set as the average density ave by the thresholdvalue setting section 42, the threshold value th1 could be substantiallyat a center of (i.e., substantially equal to the median of) the densityrange of the segment block.

The optimal threshold value range is a range within which the thresholdvalue allows the extraction of the dots of the color component selectedby the color component selecting section 40, without extracting the dotsof the unnecessary color component other than the color componentselected by the color component selecting section 40. That is, asillustrated in FIG. 17, the optimal threshold value range is from thedensity of the dots of the color component selected by the colorcomponent selecting section 40, to the density of the dots of theunnecessary color component.

Specifically, in case of white-based color dots as illustrated in FIG.17, the optimal threshold value range is larger than a density of colordots of the color component selected by the color component selectingsection 40 (i.e., the optimal threshold value range is larger than aminimum value of a pixel peak of the color component selected by thecolor component selecting section 40), but smaller than a density ofcolor dots of the unnecessary color component (i.e., the optimalthreshold value range is smaller than a minimum value of a pixel peak ofthe unnecessary color component). In case of black-based white dots, theoptimal threshold value range is smaller than a density of white dots ofthe color component selected by the color component selecting section 40(i.e., the optimal threshold value range is smaller than a minimum valueof a pixel peak of the color component selected by the color componentselecting section 40), but larger than a density of white dots of theunnecessary color component (i.e., the optimal threshold value range islarger than a minimum value of a pixel peak of the unnecessary colorcomponent).

The optimal threshold value range depends on the reading characteristicof the color image input device 1 as to the respective color componentfrom the document. The reading characteristic is a filter spectralcharacteristic of the respective components, spectral reflectancecharacteristic of ink corresponding to the respective colors, and/or thelike.

As described above, each RGB image data theoretically includes only thecolor component that is in the relationship of complementary colortherewith. But in reality, each RGB image includes an unnecessary colorcomponent. An extent of the unnecessary color component mixed in theimage data, that is, a degree of influence from the mixed unnecessarycolor component, is dependent on the reading characteristic of the colorimage input apparatus 1. Therefore, thave, c1, and c2 are predeterminedin view of the reading property of the color image input apparatus 1such that the final threshold value th2 is within the optical thresholdvalue range (as illustrated in FIG. 17) for various halftone documents.Here, thave is 128, which is the median density, c1 is 0.2, and c2 is 0.

With this, the threshold value adjusting section 43 performs thethreshold value adjustment in which the value substantially equal to themedian of the density range is a starting point of the adjustment andthe value is adjusted using the maxim density difference m sub. As aresult, the threshold value adjustment performed by the threshold valueadjusting section 43 can adjust the threshold value within the optimalthreshold value range of FIG. 17 in such a manner that the thresholdvalue will not be adjusted to cause many cases where the transitionnumber of the binary data becomes far from the theoretical value, forexample, because the final threshold value th2 becomes so low thathalftone density values to be extracted will be above the finalthreshold value th2.

Specifically, the threshold value adjusting section 43 calculates outthe maximum density difference (=170) in the G (Green) image dataillustrated in FIG. 14(b). Then, the threshold value th1 is adjustedaccording to Equations (3), using the predetermined thave (=128),c1(=0.2), and c2(=0), thereby to obtain the final threshold value th2(=104).

With this arrangement in which the final threshold value th2 is obtainedfrom a function using the average density ave and the maximum density msub of the segment block, it is possible to relatively easily adjust thethreshold value to be within the density range such that only thedesired dots are extracted regardless of the density characteristic ofthe halftone document.

On the other hand, if he threshold value setting section 42 did not usethe average density ave and the threshold value adjusting section 43 didnot use the maximum density difference m sub (that is, the thresholdvalue setting section 42 and threshold value adjusting section 43respectively used fixed values), threshold value adjustment would beperformed using, as the starting value of adjustment, a value that isnot substantially equal to the median of the density range, and thethreshold value adjustment would be possibly performed limitlessly.Consequently, the transition number of the binary data would become farfrom the theoretical value more often, for example, because the finalthreshold value th2 becomes so low that halftone density values to beextracted will be above the final threshold value th2. That is, theextraction would fail more often to selectively extract the colorcomponent in question.

As seen from Equations (3), the threshold value adjusting section 43performs different adjustments depending on whether or not the averagedensity ave is larger than thave. The reason is as follows.

Assume that density “0” indicates the color that the signal of a givencolor component indicates (e.g., green for the G signal), and thedensity “255” indicates white. As illustrated in FIG. 17, the averagedensity ave larger than thave indicates that the halftone is a compositecolor halftone that is white-based. In this case, as described above,the influence from the dots (here, the dots of pixel position 5 in FIG.17) of the unnecessary color component (here, cyan) except the colorcomponent (here, magenta) in question can be removed by subtractingMsub×c1+c2 from the threshold value th1. A small G signal indicates thatthe G signal is absorbed by the magenta component and a large G signalindicates that the magenta component is little and the G signal is notabsorbed.

On the other hand, the average density ave less than thave indicatesthat the halftone is consisting of white dots caused in the compositecolor halftone of halftone-based state. In this case, the influence fromthe white dots of the unnecessary color component (here, cyan) exceptthe color component in question (here, magenta) can be removed by addingMsub×c1+c2 to the threshold value th1.

FIG. 18(a) illustrates the binary data obtained via the binarization ofthe G (Green) image data (illustrated in FIG. 14(b)) by the binarizationsection 44, using the final threshold value th2 (=104) calculated by thethreshold value adjusting section 43.

In FIG. 18(a) in which the threshold value th2 is used, only the magentadots for which the transition number is counted are extracted. Moreover,in the example illustrated in FIG. 18(a), the maximum transition numbercalculating section 45 calculates out the maximum transition number mrev (=8) of the segment block in the following manner.

(1) Count the transition number revm (j) of the binary data of each linealong the main scanning direction (where j is a number of column (herej=0 to 9); a transition regardless of from “0” to “1” or from “1” to “0”is counted as “one” transition.)

(2) Calculate out the maximum m revm of revm (j)

(3) Count the transition number revs (i) of the binary data of each linealong the sub scanning direction where i is a number of rows (here i=0to 9).

(4) Calculate out the maximum m revs of revs (i) (see FIG. 16(a) for theresults of the calculation for the main and sub scanning directions).

(5) Calculate out the maximum transition number m rev of the segmentblock, using the following equation:m rev=m revm+m revs

Other examples of how to calculate the maximum transition number m revof the segment block encompass use of either of the following equations:m rev=m revm×m revsm rev=max (m revm, m revs)

In the following, the threshold value adjusting section 43 is comparedwith a comparative example (illustrated in FIG. 18(b)) in order toclearly show the effect of the threshold value adjusting section 14.FIG. 18(b) illustrates binary data obtained via binarization of the G(Green) data (illustrated in FIG. 14(b)), using the threshold valueth1(=138) set by the threshold value setting section 42. In the caseillustrated in FIG. 18(b), the maximum transition number calculatingsection 45 calculates out a maximum transition number mrev(=12) of asegment block.

The transition number of a segment block is uniquely dependent on aninput resolution of the image reading apparatus such as scanners and thelike, and a halftone frequency of a printed mater. In the case of thehalftone illustrated in FIG. 14(a), there are four dots in the segmentblock. Therefore, the maximum transition number m rev in the segmentblock is theoretically in a range of 6 to 8. On the other hand, in thecase of single-color halftone of high frequency (175 line/inch) asillustrated in FIG. 19(a), there are nine dots in the segment block.Therefore, as illustrated in FIG. 19(b), the maximum transition number mrev in the segment block is theoretically in a range of 10 to 12.

As described above, for the segment block illustrated in FIGS. 14(a) and14(b), the maximum transition number calculation using the finalthreshold value th2 obtained via the adjustment by the threshold valueadjusting section 43 showed that m rev=8, which is within thetheoretical range of m rev in which the segment block of the halftonefrequency (133 line/inch) should fall theoretically. On the other hand,the maximum transition number calculation using the unadjusted thresholdvalue th1 showed that m rev=12 for the segment block illustrated inFIGS. 14(a) and 14(b). This value of m rev falls off from thetheoretical range in which the segment block of the halftone frequency(133 line/inch) should fall theoretically, and becomes equal to thetheoretical value of the halftone of higher halftone frequency (175line/inch).

This is because of the following reason.

Spectral transmittance characteristic of the color image input apparatus1 such as scanners is not always similar to spectral reflectancecharacteristic of ink. Therefore, e.g., in the case of the compositecolor halftone consisting of magenta and cyan dots as illustrated inFIG. 14(a), the G (Green) image data cannot avoid influence from thedensity transition due to the cyan dots. As a result, not only themagenta dots in question but also the cyan dots not in question andunnecessary are reflected in the G (Green) image data as illustrated inFIG. 14(b), which illustrates the G (Green) image data from the RGBimage captured via a scanner or the like. In FIG. 14(b), the density(value of G signal) of each pixel in the image of FIG. 14(a) is shown,where the density “0” represents black and the density “255” representswhite. On the other hands, an example of image data without influence ofthe density transition due to cyan dots is illustrated in FIG. 20. Thedensity of the cyan halftone portion is equal to that of the paper colorportion (190). However, the densities of the cyan halftone portion andthe paper color portion are actually different as illustrated in FIG.14(b). In the transition number determination using the threshold valueth1, not only the magenta dots to be counted but also the unnecessarycyan dots are also counted. Thus, the use of the threshold value th1gives a value close to the theoretical value (10 to 12) of thesingle-color halftone of higher halftone frequency (175 line/inch) asillustrated in FIG. 17, thereby leading to erroneous determination ofthe halftone frequency. That is, the use of the threshold value th1causes poor accuracy in the halftone frequency determination.

FIG. 21(a) is a view illustrating an example of frequency distributionsof maximum transition number averages of 85 line/inch documents(“85-line/inch doc.” in drawing), 133 line/inch documents(“133-line/inch doc.” in drawing), and 175-line/inch documents(“175-line/inch doc.” in drawing), where the maximum transition numberaverages are obtained using the threshold value th1 set by the thresholdvalue setting section 42. The use of the threshold value th1 results incloseness of the composite color halftone of low frequency and thesingle-color halftone of high frequency, which results in overlapping ofthe frequency distributions of different frequencies. As a result, thehalftone frequencies in portions of the document which correspond to theoverlapping cannot be determined accurately. FIG. 21(b) is a viewillustrating an example of frequency distributions of maximum transitionnumber averages of 85 line/inch documents (“85-line/inch doc.” indrawing), 133 line/inch documents (“133-line/inch doc.” in drawing), and175-line/inch documents (“175-line/inch doc.” in drawing), where themaximum transition number averages are obtained using the thresholdvalue th2 obtained by the threshold value adjusting section 43. As aresult of the use of the threshold value th2, the maximum transitionnumber average of the composite color halftone of low frequency becomeslargely different from that of the single-color halftone of highfrequency, thereby eliminating or reducing the overlapping of thefrequency distributions. This makes it possible to attain higherhalftone frequency determination accuracy.

As described above, the present embodiment is arranged such that theflat halftone discrimination section 41 discriminates the segment blockas to whether they are of flat halftone portion, and the maximumtransition number averages of those segment blocks which arediscriminated as the flat halftone portion are extracted. With this,overlapping of the frequency distributions of the maximum transitionnumber averages for the respective halftone frequencies is eliminated(or reduced).

Further, the threshold value adjusting section 43 adjusts the thresholdvalue of the binarization by using the adjusting value predeterminedcorresponding to the reading property of the color image input apparatus1. With this, the transition number of the color component in questioncan be selectively extracted even for the composite color halftone. As aresult, overlapping of the frequency distributions of the maximumtransition number averages is eliminated (or reduced).

This allows highly accurate halftone determination.

Note that the threshold value setting section 42 and the threshold valueadjusting section 43 may be individual sections (blocks) separately, butmay be a single section (block) integrally that performs both thefunctions of the threshold value setting section 42 and the thresholdvalue adjusting section 43, even though the former case is describedabove.

Example of Process Using Halftone frequency Determination Signal

An example of the process based on the result of the halftone frequencydiscrimination performed by the halftone frequency determining section14 is described below.

In halftone images, moire sometimes occurs due to interference betweenthe halftone frequency and a periodic intermediate tone process (such asdither process). To prevent moire, a flattening process that reducesamplitude of the halftone image in advance may be adopted. Such aflattening process may be sometimes accompanied with such imagedeterioration that a halftone photo and a character on halftone areblurred. Examples of solutions for this problem are as follows:

Solution (1): Employ flattening/enhancing mixing filter that reduces anamplitude of only the moire-causing frequency of the halftone whileamplifying an amplitude of a frequency component lower than thefrequency of a constituent element (human, landscape, etc.) of the photoor of a character.

Solution (2): (2) Detect a character located on a halftone and subjectsuch a character to an enhancing process, which is not carried out forthe photo halftone and background halftone.

Here, Solution (1) is discussed. Different halftone frequencies requirethe filter to have different frequency properties in order to preventthe moire and keep the sharpness of the character on halftone and thehalftone photo at the same time. Therefore, according to the halftonefrequency determined by the halftone frequency determining section 14,the spatial filter processing section 18 performs a filtering processhaving the frequency property suitable for the halftone frequency. Withthis, it is possible to attain the moire prevention and sharpness of thehalftone photo and character on halftone at the same time for halftonesof any frequencies.

On the other hand, if, as in the conventional art, the frequency of thehalftone image was unknown, it would be necessary to have a process thatprevents moiré in the halftone images of all the frequencies, in orderto prevent moire that causes the most significant image deterioration.This does not allow using any flattening filters except a flatteningfilter that reduces the amplitudes of all the halftone frequencies. Theuse of such a flattening filter results in blurring of the halftonephoto and the character on halftone.

FIG. 22(a) gives an example of a filter frequency property most suitablefor the 85 line/inch. FIG. 22(b) gives an example of a filter frequencyproperty most suitable for the 133 line/inch. FIG. 22(c) gives anexample of a filter frequency property most suitable for the 175line/inch. FIG. 23(a) gives an example of filter coefficientscorresponding to FIG. 22(a). FIG. 23(b) gives an example of filtercoefficients corresponding to FIG. 22(b). FIG. 23(c) gives an example offilter coefficients corresponding to FIG. 22(c).

Here, Solution (2) is discussed. Use of a low-frequency edge detectingfilter or the like, as illustrated in FIG. 24(a) or 24(b), can detectthe character on high-frequency halftone highly accurately withouterroneously detecting the edge of the high-frequency halftone, becausethe character and the high-frequency halftone are different in thefrequency properties. However, for the low-frequency edge detectingfilter or the like, it is difficult to detect a character onlow-frequency halftone because the low-frequency halftone has afrequency property similar to that of the character. If such a characteron low-frequency halftone was detected, erroneous detection of thehalftone edge would be significant, thereby causing poor image quality.Hence, based on the frequency of the halftone image determined by thehalftone frequency determining section 14, a detection process for thecharacter on halftone is carried out by the segmentation process section21 only when the character is on a high-frequency halftone, e.g. 133line/inch or higher. Alternatively, a result of the halftone edge wouldbe valid only when the character is on a high-frequency halftone, e.g.,133 line/inch or higher. With this, it is possible to improvereadability of the character on high-frequency halftone without causingthe image deterioration.

The process using the halftone frequency determination signal may becarried out by the color correction section 16 or the tone reproductionprocess section 20.

<Modification 1>

The halftone frequency determining section 14 may be replaced with ahalftone frequency determining section (halftone frequency determiningmeans) 14 a, which is provided with a threshold value setting section(threshold value determining means) 42 a, instead of the threshold valuesetting section 42. The threshold value setting section 42 a sets afixed value as the threshold value, while the threshold value settingsection 42 sets, as the threshold value, the average density of thepixels in the segment block.

FIG. 25 is a block diagram illustrating an arrangement of halftonefrequency determining section 14 a. As illustrated in FIG. 25, halftonefrequency determining section 14 a is provided with a color componentselecting section 40, a flat halftone frequency determining section 41,the threshold value setting section 42 a, a threshold value adjustingsection (threshold value determining means) 43 a, a binarization section44, a maximum transition number calculating section 45, a maximumtransition number averaging section 46, a halftone frequency estimatingsection 47, and an pixel density averaging section 48.

The threshold value setting section 42 a sets a predetermined fixedvalue as a threshold value th1 that is used to obtain a final thresholdvalue th2 for use in binarization of a segment block. For example, thefixed value set by the threshold value setting section 42 a is 128,which is a median of a whole density range (0 to 255).

The pixel density averaging section 48 calculates out an average densityave of pixels in the segment block.

The threshold value adjusting section 43 a gives the final thresholdvalue th2 by adjusting the threshold value th1 from the followingEquations (4) using the threshold value th1 set by the threshold valuesetting section 42 a and the average density ave calculated out by thepixel density averaging section 48.If ave>thave, th2=th1−c3, andIf not, th2=th1+c3   Equation (4),where thave and c3 are optical values predetermined via experiment forthe respective R, G, B color components. The threshold value adjustingsection 43 a stores therein thave and c3 predetermined for therespective color components, so that the threshold value adjustingsection 43 a uses thave and c3 that correspond to the color componentindicated by a selection color component signal sent thereto from thecolor component selecting section 40.

Moreover, thave and c3 are so predetermined to attain such a thresholdvalue th2 that the threshold value th2 will be within an optimalthreshold value range that allows extraction of only the desired dots ofthe color component that the final threshold value th2 targets, withoutextracting the unnecessary color component. Specifically, thave and c3are predetermined via such an experiment in which various halftonedocuments whose halftone frequencies are already known are used to findfinal threshold values th2 that give transition numbers of the binarydata close to theoretical values (expected values) of the halftonedocuments.

Next, the method of the halftone frequency determination processperformed by the halftone frequency determining section 14 a having theabove arrangement is described below referring to the flowchartillustrated in FIG. 26.

To begin with, the threshold value setting section 42 a sets a fixedvalue (e.g., the medium of the whole density range) as the thresholdvalue th1 (S41).

Next, the color component selecting section 40 selects image data havinga larger busyness than others among the R, G, B image data, and thenoutputs the selected image data to the pixel density averaging section48 and the binarization section 44 (S42). Moreover, the color componentselecting section 40 outputs to the threshold value adjusting section 43a a selected color component signal that indicates which color componentis selected.

Next, the pixel density averaging section 48 calculates out the averagepixel density ave of the segment block (S43).

After that, the threshold value adjusting section 43 a calculates outthe final threshold value th2 by adjusting the threshold value th1according to Equations (4) using the thave and c3 that correspond to thecolor component indicated by the selected color component signaloutputted from the color component selecting section 40 (S44).

The binarization and the maximum transition number calculation areperformed in the same manner as S35 and S36 described above. Moreover,the flat halftone frequency discrimination performed in parallel withS43, S44, S35, and S36 is carried out in the same manner as S37.Further, the processes of S38 to S40 are carried out after S36 and S37.In the present modification, however, the threshold value settingsection 42 a sets, as a threshold value th1, a fixed value for all thesegment blocks. Therefore, if all the segment blocks have not beenprocessed yet at S38, the process returns to the color componentselecting process at S42.

<Modification 2>

Another modification of the present invention is described below.

A color image forming apparatus of the present modification is providedwith a halftone frequency determining section 14 b as illustrated inFIG. 27, instead of the halftone frequency determining section 14 asillustrated in FIG. 1.

As illustrated in FIG. 27, the halftone frequency determining section 14b is provided with a color component selecting section 40, a flathalftone frequency determining section 41, the threshold value settingsection 42, a threshold value adjusting section (threshold valuedetermining means) 43 b, a binarization section 44, a maximum transitionnumber calculating section 45, a maximum transition number averagingsection 46, and a halftone frequency estimating section 47.

Using Equation (4), the threshold value adjusting section 43 b adjuststhe threshold value th1 (average density ave) set by the threshold valuesetting section 42, thereby to obtain a final threshold value th2. Thethreshold value adjusting section 43 b stores therein thave and c3predetermined for the respective color components, so that the thresholdvalue adjusting section 43 b uses thave and c3 that correspond to thecolor component indicated by a selection color component signal sentthereto from the color component selecting section 40.

A method of the halftone frequency determination process performed bythe halftone frequency determining section 14 b having the abovearrangement is almost identical with the procedure of the flowchart ofFIG. 13 except that the threshold value adjusting process uses Equations(4) instead of Equations (3) unlike the process at S34 in the flowchartof FIG. 13.

<Modification 3>

In the above embodiment, the flat halftone determining process andthreshold value setting/threshold value adjustment/binarization/maximumtransition number calculation are performed in parallel, and the averageof the transition numbers in the halftone region is calculated out onlyfrom the transition numbers of the segment blocks from which the flathalftone discrimination signal flat of 1 is outputted. In this case, tospeed up the parallel processes, it is necessary to provide at least twoCPUs respectively for the flat halftone determination and for thethreshold value setting/threshold value adjustment/binarization/maximumtransition number calculation.

In case where only one CPU is provided for performing each process, itmay be arranged such that the flat halftone discriminating process iscarried out first so that the threshold value setting/threshold valueadjustment/binarization/maximum transition number calculation is carriedout for the halftone region which is discriminated as a flat halftoneportion.

In this arrangement, the halftone frequency determining section 14 asillustrated in FIG. 1 is replaced with a halftone frequency determiningsection (halftone frequency determining means) 14 c as illustrated inFIG. 28.

The halftone frequency determining section 14 c is provided with a colorcomponent selecting section 40, a flat halftone discriminating section(flat halftone discriminating section means) 41 c, a threshold valuesetting section (threshold value determining means) 42 c, a thresholdvalue adjusting section (threshold value determining means) 43 c, abinarization section (extraction means, binarization means) 44 c, amaximum transition number calculating section (extraction means,transition number calculating means) 45 c, a maximum transition numberaveraging section (extraction means, transition number calculatingmeans) 46 c, and a halftone frequency estimating section (halftonefrequency operating means) 47.

The flat halftone discriminating section 41 c performs a flat halftonediscriminating process similar to that of the flat halftonediscriminating section 41, and outputs a flat halftone discriminationsignal flat, which indicates a result of the discrimination, to thethreshold value setting section 42 c, the threshold value adjustingsection 43 c, the binarization section 44 c, and the maximum transitionnumber calculating section 45 c.

Only for the segment blocks for which the flat halftone determinationsignal of 1 is outputted, the threshold value setting section 42 c, thethreshold value adjusting section 43 c, the binarization section 44 c,and the maximum transition number calculating section 45 c respectivelyperform threshold value setting, threshold value adjustment (includingcalculation of the maximum density difference), binarization, andmaximum transition number calculation similar to those correspondingprocesses performed by the threshold value setting section 42, thethreshold value adjusting section 43, the binarization section 44, andthe maximum transition number calculating section 45 c.

The maximum transition number averaging section 46 c calculates anaverage of all the maximum transition numbers calculated by the maximumtransition number calculating section 45.

FIG. 29 is a flowchart illustrating a method of the halftone frequencydetermining process performed by the halftone frequency determiningsection 14 c.

Firstly, the color component selecting section 40 performs the colorcomponent selecting process for selecting a color component having abusyness higher than the rest color components (S41). Next, the flathalftone frequency discriminating section 41 c performs the flathalftone frequency discriminating process and outputs the flat halftonefrequency discrimination signal flat (S42).

Next, the threshold value setting section 42 c, the threshold valueadjusting section 43 c, the binarization section 44 c, and the maximumtransition number calculating section 45 c judges whether the flathalftone discrimination signal flat is “1” indicating that the segmentblock is the flat halftone portion, or “0” indicating that the segmentblock is the non-flat halftone portion. That is, whether the segmentblock is the flat halftone portion or not is judged (S43).

For the segment block of the flat halftone portion, that is, for thesegment block for which the flat halftone discrimination signal flat=1,the threshold value setting section 42 c performs the threshold valuesetting to set the average density as the threshold value th1 (S44), thethreshold value adjusting section 43 c performs calculation of themaximum density difference (S45) and threshold value adjustment byEquations (3) using the adjusting value that corresponds to the selectedcolor component signal (S46), the binarization section 44 c performs thebinarization (S47), and the maximum transition number calculatingsection 45 c performs the maximum transition number calculation (S48) inthis order, followed by S49.

On the other hand, for the segment block of the non-flat halftoneportion, that is, for the segment block for which the flat halftonediscrimination signal flat=0, the process goes to S49 with the thresholdvalue setting section 42 c, the threshold value adjusting section 43 c,the binarization section 44 c, the maximum transition number calculatingsection 45 c performing nothing.

Next, at S49, it is judged whether or not the processes are done for allthe segment blocks. If not, the processes of the S41 to S48 are repeatedfor the next segment block.

If yes, the maximum transition number averaging section 46 c calculatesout an average of the maximum transition numbers, calculated at S48, ofthe whole halftone region (S50). Note that the maximum transitionnumbers of the segment blocks for which the flat halftone discriminationsignal flat=1 are calculated out at S48. Therefore, the average of themaximum transition numbers of the segment blocks of the flat halftoneportion is calculated out at S50. Then, the halftone frequencyestimating section 47 estimates the halftone frequency of the halftoneregion from the average calculated out by the maximum transition numberaveraging section 46 c (S51). By this the halftone frequency determiningprocess is completed.

As described above, the threshold value setting section 42 c, thresholdvalue adjusting section 43 c, binarization section 44 c, and maximumtransition number calculating section 45 c are only required to performthe threshold value setting, threshold value adjustment, binarization,and maximum transition number calculation respectively with respect toonly the segment blocks judged as the flat halftone portion(s). Thus,the halftone frequency determining process may be improved by using onlyone CPU.

Moreover, the maximum transition number averaging section 46 ccalculates out the average of the maximum transition numbers of thesegment blocks judged as the flat halftone portion(s). That is, thecalculated-out maximum transition number average reflects the flathalftone portion(s) in which the density transition is low and fromwhich the binary data correctly reproducing the halftone frequency canbe generated. With this, the halftone frequency can be determined highlyaccurately by determining the halftone frequency by using the maximumtransition number average.

<Modification 4>

In the arrangement described above, the flat halftone discriminatingprocess is performed by the flat halftone discriminating section 41,based on the difference in density between the adjacent pixels. However,the flat halftone discriminating process is not limited to thisarrangement. For example, flat halftone discriminating process of the G(Green) image data illustrated in FIG. 14(b) may be performed by theflat halftone discriminating section 41 in the following manner.

To begin with, average densities Ave_sub 1 to 4 of pixels of sub segmentblocks 1 to 4, which are tetrametric of the segment block illustrated inFIG. 14(b), are obtained from the following Equations:${Ave\_ sub1} = \frac{\sum\limits_{i = 0}^{4}\quad{\sum\limits_{j = 0}^{4}{f( {{\mathbb{i}},j} )}}}{25}$${Ave\_ sub2} = \frac{\sum\limits_{i = 0}^{4}\quad{\sum\limits_{j = 5}^{9}{f( {{\mathbb{i}},j} )}}}{25}$${Ave\_ sub3} = \frac{\sum\limits_{i = 5}^{9}\quad{\sum\limits_{j = 0}^{4}{f( {{\mathbb{i}},j} )}}}{25}$${Ave\_ sub4} = \frac{\sum\limits_{i = 5}^{9}\quad{\sum\limits_{j = 5}^{9}{f( {{\mathbb{i}},j} )}}}{25}$

If the following conditional equation using the Ave_sub 1 to 4 issatisfied, a flat halftone discrimination signal of 1, which indicatesthe segment block is of flat halftone, is outputted. If not, a flathalftone discrimination signal of 0, which indicates the segment blockis of non-flat halftone, is outputted. The conditional equation is asfollows:max(|Ave_sub 1−Ave_sub 2|, |Ave_sub 1−Ave_sub 3|, |Ave_sub 1−Ave_sub 4|,|Ave_sub 2−Ave_sub 3|, |Ave_sub 2−Ave_sub 4|, |Ave_sub 3−Ave_sub 4|).

TH_avesub is a threshold value predetermined via experiment.

For example, for the segment block illustrated in FIG. 14(b), Ave_sub1=136, Ave_sub 2=139, Ave_sub 3=143, Ave_sub 4=140. Then, max(|Ave_sub1−Ave_sub 2|1, |Ave_sub 1−Ave_sub 3|, |Ave_sub 1−Ave_sub 4|, |Ave_sub2−Ave_sub 3|, |Ave_sub 2−Ave_sub 4|, |Ave_sub 3−Ave_sub 4|)=7. Thisvalue is compared with TH_avesub. The flat halftone discriminationsignal is outputted based on the comparison.

As described above, in Modification 4, the segment block is partitionedinto plural sub segment blocks and the average densities of pixels inrespective sub segment blocks are obtained. Then, the judgment onwhether the segment block is the flat halftone portion or non-flathalftone portion is made based on the maximum value among thedifferences between the average densities of the sub segment blocks.

With this modification, it is possible to shorten the time periodnecessary for the arithmetic process, compared with the arrangementdescribed above in which the judgment using the absolute difference sumssubm and subs between adjacent pixels is employed.

Second Embodiment

Another embodiment according to the present invention is describedbelow. Sections having the like functions as the corresponding sectionsin the first embodiment are labeled with like references and theirexplanation is omitted here.

The present embodiment relates to an image reading process apparatusprovided with a halftone frequency determining section 14 of the firstembodiment.

The image reading process apparatus according to the present embodimentis, as illustrated in FIG. 30, with a color image input apparatus (imagereading apparatus) 101, an image processing apparatus 102, and anoperation panel 104.

The operation panel 104 is provided with a setting key(s) for settingoperation modes of the image reading process apparatus, ten keys, aliquid crystal display apparatus, and/or the like.

The color image input apparatus 101 is provided with a scanner section,for example. The color image input apparatus 101 reads reflection imagefrom a document via a CCD (Charge Coupled Device) as RGB analog signals(R: red; G: green; and B: blue).

The image processing apparatus 102 is provided with the A/D(analog/digital) converting section 11, the shading correction section12, the document type automatic discrimination section 13, and thehalftone frequency determining section 14, which have been describedabove.

The document type automatic discrimination section 13 in the presentembodiment outputs a document type signal to an apparatus (e.g. acomputer, printer or the like) in downstream thereof, the document typesignal indicating which type a document is. Moreover, the halftonefrequency determining section 14 of the present embodiment outputs ahalftone frequency determination signal to an apparatus (e.g. acomputer, printer or the like) in downstream thereof, the halftonefrequency determination signal indicating halftone frequency determinedby the halftone frequency determining section 14.

As described above, the image reading process apparatus outputs thedocument type signal and the halftone frequency determination signal tothe computer in the downstream thereof, in addition to RGB signalsrepresenting the document. Alternatively, the image reading processapparatus may be arranged to output these signals to the printerdirectly, without a computer interposed therebetween. Again in thisarrangement, the document type automatic discrimination section 13 isnot inevitably necessary. Moreover, the image processing apparatus 102may be provided with the halftone frequency determining section 14 a,the halftone frequency determining section 14 b, or the halftonefrequency determining section 14 c, in lieu of the halftone frequencydetermining section 14.

[Description on Program and Storage Medium]

Moreover, the halftone frequency determining process according to thepresent invention may be realized as software (application program).With this arrangement, it is possible to provide a computer or printerwith a printer drive in which the software realizing a process that isperformed based on the halftone frequency determination result isincorporated.

As an example of the above arrangement, a process that is performedbased on the halftone frequency determination result is described below,referring to FIG. 31.

As illustrated in FIG. 31, a computer 5 is provided with a printerdriver 51, a communication port driver 52, and a communication port 53.The printer driver 51 is provided with a color correction section 54, aspatial filter process section 55, a tone reproduction process section56, and a printer language translation section 57. Moreover, thecomputer 5 is connected with a printer (image outputting apparatus) 6.The printer 6 outputs an image according to image data outputted theretofrom the computer 5.

The computer 5 is arranged such that the image data generated byexecution of-various application program(s) is subjected to colorcorrection process performed by the color correction section 54 therebyto remove color inaccuracy. Then, the image data is subjected tofiltering process performed by the spatial filter process section 55.The filtering process is based on the halftone frequency determinationresult. In this arrangement, the color correction section 54 alsoperforms black generating/background color removing process.

The image data subjected to the above processes is then subjected to atone reproduction (intermediate tone generation) by the tonereproduction process section 56. After that, the image data istranslated into a printer language by the printer language translationsection 57. Then, the image data translated in the printer language isinputted into the printer 6 via the communication port driver 52, andthe communication port (for example, RS232C, LAN, or the like) 53. Theprinter 6 may be a digital complex machine having a copying functionand/or faxing function, in addition to the printing function.

Moreover, the present invention may be realized by recoding, in acomputer-readable storage medium, a program for causing a computer toexecute the image processing method in which the halftone frequencydetermining process is performed.

Thereby, a storage medium in which the program for performing the imageprocessing method in which the halftone frequency is determined andsuitable processes are performed based on the halftone frequencydetermined can be provided in a form that allows the storage medium tobe portably carried around.

As long as the program is executable on a microcomputer, the storagemedium may be (a) a memory (not illustrated), for example, a programmedium such as ROM, or (b) a program medium that is readable on aprogram reading apparatus (not illustrated), which serves as an externalrecording apparatus.

In either arrangement, the program may be such a program that isexecuted by the microprocessor accessing to the program stored in themedium or such a program that is executed by the microprocessorexecuting the program read out and downloaded to a program recordingarea (not illustrated) of the microcomputer. In this case, themicrocomputer is installed in advance with a program for downloading.

In addition, the program medium is a storage medium arranged so that itcan be separated from the main body. Examples of such a program mediumincludes storage media that hold a program in a fixed manner, andencompasses: tapes, such as magnetic tapes, cassette tapes, and thelike; magnetic disks, such as flexible disks, hard disk, and the like;discs, such as CD-ROM, MO, MD, DVD, and the like; card-type recordingmedia, such as IC cards (inclusive of memory cards), optical cards andthe like; and semiconductor memories, such as mask ROM, EPROM (erasableprogrammable read only memory), EEPROM (electrically erasableprogrammable read only memory), flash ROM and the like.

Alternatively, if a system can be constructed which can connect to theInternet or other communications network, the program medium may be astorage medium carrying the program in a flowing manner as in thedownloading of a program over the communications network. Further, whenthe program is downloaded over a communications network in this manner,it is preferable if the program for download is stored in a main bodyapparatus in advance or installed from another storage medium.

The storage medium is arranged such that the image processing method iscarried out by reading the recording medium by using a program readingapparatus provided to a digital color image forming apparatus or acomputer system.

The computer system is provided with an image input apparatus (such as aflat head scanner, film scanner, digital camera, or the like), acomputer for executing various processes inclusive of the image processmethod by loading thereon a certain program(s), an image display device(such as a CRT display apparatus, a liquid crystal display apparatus, orthe like), and a printer for outputting, on paper or the like, processresult of the computer. Further, the computer system is provided withcommunication means (such as a network card, modem, or the like) forbeing connected with a server or the like via the network.

So far, described are the arrangements in which the prevention ofextracting the signal of the unnecessary color component from thecomposite color halftone region (i.e., removing the signal of theunnecessary color component) is carried out by changing, per segmentblock, the threshold value for use in the binarization of the image dataof the selected color component. That is, the threshold value adjustingsection is a particular color component extracting means for extractingselectively the signal of the color component in question, which hasbeen selected by the color component selecting section. However, theremoval of the signal of the unnecessary color component is not limitedto this. For example, the necessary signal can be selected according tocolor balance in the image data consisting of the RGB signals.

More specifically, this can be carried out as follows.

As to the halftone pixel or the segment block of the halftone regiondetected by the document type automatic discrimination section 13, thecolor component selecting section 40 selects a color component that hasa larger busyness than the other color components. If the input image isin composite color halftone, it is desirable that, among CMY in eachsegment block, only the color having a larger density change (busyness)than the rest be taken into consideration and the halftone frequency ofthe color be used for determining the halftone frequency of thedocument. Further, it is desirable that dots of the color having thelarger density transition than the rest are processed by using a channel(signal of the input image data) most suitable for representing thedensity of the dots of the color. Specifically, for a composite colorhalftone consisted mainly of magenta dots as illustrated in FIG. 14(a),G (green) image (complementary color for magenta) is used, which is mostsuitable for processing magenta. This makes it possible to performhalftone frequency determining process which is based on substantiallyonly the magenta dots. In the segment block as illustrated in FIG.14(a), G (Green) image data is the image data having the larger busynessthan the other image data. Thus, for the segment block as illustrated inFIG. 14(a), the color component selecting section 40 selects the G(Green) image data as image data to be outputted to the threshold valuesetting section 42, the threshold value adjusting section 43, and thebinarization section 44.

In this process, it is possible to limit the dots in question to themagenta dots. Thus, the feature representing the frequency can becalculated out without the influence from the dots of the colorcomponents other than the magenta component, thereby making it possibleto perform highly accurate frequency determination for the compositecolor halftone.

For example, the color component selecting section 40 may output, to themaximum transition number calculating section 45, the selected colorcomponent signal that indicates the selected color component.

The maximum transition number calculating section 45 calculates out amaximum transition number of the segment block from a transition number(m rev) of the binary data obtained from main scanning lines and subscanning lines, i.e., how many times the binary data, obtained from mainscanning lines and sub scanning lines, is switched over. Here, based onthe balance of pixel values of the R, G, B images that correspond to thepixels for which the binary data is switched over, the maximumtransition number calculating section 45 can perform its calculationbased on only the dots (here, magenta dots) of the color component inorder to obtain the transition number, the color component beingindicated by the selected color component signal sent thereto from thecolor component selecting section 40. With this, the maximum transitionnumber calculating section 45 can count the transition number of thedots of the color in question selectively.

Moreover, the halftone frequency determination is not limitedlyapplicable the removal of the signal of the unnecessary color componentin dealing with the composite color halftone region. For example, theremoval of the signal of the unnecessary color component may be appliedto the extraction of the halftone region.

As described above, an image processing apparatus according to thepresent invention may be an image processing apparatus 2 provided with ahalftone frequency determining section (halftone frequency determiningmeans) 14 for determining a halftone frequency of an image that has beenread from a document by an image reading apparatus. The halftonefrequency determining section 14 includes: a color component selectingsection (color component selecting means) 40 for selecting a colorcomponent which has a larger busyness than other color components; and amaximum transition number calculating section (maximum transition numbercalculating means) 45 for calculating (counting) a transition number ofbinary data with respect to dots of the color component selected by thecolor component selecting section 40.

In other words, the maximum transition number calculating section 45 isa particular color component signal extracting means for detecting onlya feature that corresponds to the dots of the color component selectedby the color component selecting section 40.

With this, it is possible to remove the signal of the unnecessary colorcomponent.

As described above, an image processing apparatus according to thepresent invention is provided with halftone frequency determining meansfor determining halftone frequency of an image that has been read from adocument by an image reading apparatus, the halftone frequencydetermining means being arranged as follows. The halftone frequencydetermining means is provided with flat halftone discriminating meansfor extracting information of density distribution per segment blockconsisting of a plurality of pixels, and discriminating, based on theinformation of density distribution, whether the segment block is a flathalftone region in which density transition is low, or a non-flathalftone region in which the density transition is high; threshold valuedetermining means for determining a threshold value by using anadjusting value that is predetermined in accordance with a readingproperty of the image reading apparatus with respect to respective colorcomponents, the threshold value being for use in extraction of a featureof density transition between pixels; extracting means for extracting,by using the threshold value determined by the threshold valuedetermining means, the feature of density transition between pixels ofthe segment block which the flat halftone discriminating meansdiscriminates as the flat halftone region; and halftone frequencyestimating means for estimating the halftone frequency, based on thefeature extracted by the extracting means.

Here, the segment block is not limited to a rectangular region and mayhave any kind of shape arbitrarily.

In this arrangement, the flat halftone discriminating means extractsinformation of density distribution per segment block consisting of aplurality of pixels, and discriminates, based on the information ofdensity distribution, whether a given segment block is a flat halftoneregion (in which the density transition is low) or a non-flat halftoneregion (in which the density transition is high). Then, the extractingmeans extracts the feature of density transition between pixels of thesegment block which the flat halftone discriminating means discriminatesas the flat halftone region. The halftone frequency is determined basedon the feature.

As described above, the halftone frequency is determined based on thefeature of density transition between pixels of the segment block whichis included in the flat halftone region in which the density transitionis low. That is, the determination of the halftone frequency is carriedout after removing the influence of the non-flat halftone region inwhich the density transition is high and which causes erroneous halftonefrequency determination. In this way, accurate halftone frequencydetermination is attained.

Moreover, the reading property of the image reading apparatus withrespect to respective color components is, for example, a filterspectral property of the image reading apparatus (such as a scanner)with respect to the respective color component, a spectral reflectionproperty of ink with respect to the respective color component, or thelike property of the image reading apparatus. For instance, G (Green)image data is theoretically consists of only magenta, which is in acomplementary color of green. However, in reality, unnecessary cyancomponent is also mixed in the G (Green) image data due to the readingproperty of the image reading apparatus with respect to the document. Anextent of influence given by the cyan component is varied depending onthe reading property.

Therefore, the adjusting value is predetermined considering the extentof the influence given to the image data by the unnecessary colorcomponent other than the particular color component. The use of theadjusting value in determining the threshold value, the threshold valuedetermining means can determine the threshold value so that theinfluence given by the unnecessary color component is removed from thethreshold value.

Further, the extracting means extracts the feature of density transitionbetween pixels according to the threshold value determined by thethreshold value determining means. With this, the feature extracted bythe extracting means is not influenced by the unnecessary colorcomponent. Therefore, the halftone frequency determination based on theparticular color component can be performed by determining the halftonefrequency from the feature extracted from the extracting means. That is,it is possible to perform highly accurate halftone frequencydetermination even for the composite color halftone region.

In addition to the above arrangement, the image processing according tothe present invention may be arranged such that the extracting means isprovided with: binarization means for performing the binarization inorder to generate binary data of each pixel of the segment blockaccording to the threshold value determined by the threshold valuedetermining means; transition number calculating means for calculating atransition number of the binary data generated by the binarizationmeans; and transition number extracting means for extracting, as thefeature, a transition number of the segment block which the flathalftone discriminating means discriminates as the flat halftone region,from among the transition numbers calculated out by the transitionnumber calculating means.

The binarization with respect to the non-flat halftone region in whichthe density transition is high results in unfavorable discrimination ofthe white pixel portion (low density halftone portion) and black pixelportion (high density halftone portion) as illustrated in FIG. 32(d).Such binarization does not generate the binary data that extracts onlythe printed portion of the halftone thereby correctly reproducing thehalftone frequency, as illustrated in FIG. 32(c).

However, even if the binarization using a single threshold value is usedwith respect to the segment blocks, the above arrangement allowsdiscriminating the flat halftone region in which the density transitionis low and from which the binary data from which the halftone frequencycan be reproduced correctly can be generated. Then, the transitionnumber extracting means extracts, as the feature, only the transitionnumber of the segment block that is discriminated as the flat halftoneregion by the flat halftone discriminating means, from among thetransition numbers calculated out by the transition number calculatingmeans.

With this, the transition number extracted as the feature corresponds tothe flat halftone region in which the density transition is low and fromwhich the binary data correctly reproducing the halftone frequency canbe generated. Therefore, the use of the transition number extracted asthe feature makes it possible to determine the halftone frequencyaccurately.

If the binarization was carried out with a fixed threshold value but notthe threshold value adjusted by the threshold value determining means,the halftone frequency of the composite color region in which aplurality of colors such as cyan, magenta, and/or yellow is used couldnot be correctly reproduced sometimes because dots of a plurality ofcolor components would be extracted together.

However, with this arrangement, the threshold value determining meansdetermines (i.e., decides) the threshold value by using the adjustingvalue predetermined in consideration of the reading characteristics ofthe reading device with respect to the respective components. With this,the threshold value determining means can determine the threshold value,for example, to fall in a range between the density of the halftone ofthe particular color component and the density of the unnecessary colorcomponent other than the particular color component.

The binary data is generated based on the threshold value, whereby thebinary data generated is not influenced by the unnecessary colorcomponent. As a result, even for the composite color halftone, itbecomes possible to generate the binary data in which the halftone ofthe desired particular color component is selectively extracted. Highlyaccurate halftone determination can be attained by using the transitionnumber of such binary data.

In addition to the above arrangement, the image processing apparatusaccording to the present invention may be arranged such that theextracting means is provided with binarization means for performing thebinarization in order to generate, according to the threshold valuedetermined by the threshold value determining means, binarization dataof each pixel in the segment block that the flat halftone discriminatingmeans discriminates as the flat halftone region; and transition numbercalculating means for calculating out, as the feature, a transitionnumber of the binary data generated by the binarization means.

In this arrangement, the binarization means generates the binary data ofeach pixel in the segment block that is discriminated as the flathalftone region by the flat halftone discriminating means. Then, thetransition number calculating means calculates out, as the feature, thetransition number of the binary data generated by the binarizationmeans. Therefore, the transition number calculated as the featurecorresponds to the flat halftone region in which the density transitionis low and from which the binary data that reproduces the halftonecorrectly can be generated. Therefore, the use of the transition numbercalculated as the feature allows accurate halftone frequencydetermination.

In addition to the above arrangement, the image processing apparatus maybe arranged such that the threshold value determining means determinesthe threshold value from an average density of the pixels in the segmentblock.

With this arrangement, from the average density of the pixels in thecurrent block, the threshold value determining means can operate basedon a value located substantially equal to the median of the densityrange of the current block. Thereby, the threshold value determiningmeans adjusts, by using the adjusting value, the threshold value fromthe value located substantially equal to the median of the densityrange. The threshold value adjusted can be within a density range thatallows the generation of binary data that correctly reproduces thehalftone frequency of the desired color component. This makes it easierto obtain the binary data that correctly reproduces the halftonefrequency of the desired color component.

Moreover, by comparing the average density and the median of the densityrange, the threshold value determining means can determine whether theimage is a halftone-based or white-based. Here, the term“halftone-based” means a state of an image in which a color of a colormaterial used (e.g., cyan, magenta, yellow, or a composite color usingany of them) in the halftone is dominant. The term “white-based” meansis a state of an image in which a color of paper is dominant. Forexample, assume a case of the density range of 0 to 255, where “0” iswhite and “255” is a color (e.g., cyan, magenta, or yellow) indicated bya signal of a color component (i.e., a case of a CMY signal which is ofcomplementary color transformation of a RGB signal). Here, if theaverage density is larger than the median, the image is judged as beinghalftone-based. If the average density is smaller than the median, theimage is judged as being white-based. If the image is halftone-based,the threshold value determining means determines the threshold value byusing the adjusting value, so that the threshold value is a valueobtained by subtracting a predetermined value from the average density.The threshold value is a value between (a) a density at a peak positionof a pixel peak of white dots of the particular color component (here,this density value is a minimal value of the pixel peak) and a densityat a peak position of a pixel peak of white dots of the unnecessarycolor component (here, this density value is a minimal value of thepixel peak). As a result, the transition number calculated out by thetransition number calculating means becomes a value that correspondsonly to the pixel peak of the white dots in the halftone-based state ofthe particular color component. With this, the halftone frequency of thedesired particular color component can be determined correctly.

On the other hand, if the image is white-based, the threshold valuedetermining means determines the threshold value by using the adjustingvalue, so that the threshold value is a value obtained by adding apredetermined value to the average density. The threshold value is avalue between (a) a density at a peak position of a pixel peak of awhite dot of the particular color component (here, this density value isa maximum value of the pixel peak) and a density at a peak position of apixel peak of a white dot of the unnecessary color component (here, thisdensity value is a maximum value of the pixel peak). As a result, thetransition number calculated out by the transition number calculatingmeans becomes a value that corresponds only to the pixel peak in thewhite-based state of the particular color component. With this, thehalftone frequency of the desired particular color component can bedetermined correctly.

In addition to the above arrangement, the image processing apparatusaccording to the present invention may be arranged such that thethreshold value determining means determines the threshold value fromdensity information of the segment block.

If the threshold value determined by the threshold value determiningmeans was excessively large, such excessively large threshold valuewould even lead to failure of extracting the dots of the desiredparticular color component. If the threshold value determined by thethreshold value determining means was excessively small, suchexcessively small threshold value would even lead to extraction of thedots of plural kinds of color components, not only the dots of thedesired particular color component.

However, in this arrangement, the determination is based on the densityinformation (e.g., maximum density difference) of the current block.Therefore, with this arrangement, it is easier for the threshold valuedetermining means to determine the threshold value within such a rangewithin which the threshold value allows extracting the particular colorcomponent selectively. This arrangement makes it easier to obtain binarydata that correctly reproduces the halftone frequency of the particularcolor component.

In addition to the above arrangement, the image processing apparatusaccording to the present invention may be arranged such that the flathalftone discriminating means performs the discrimination whether thesegment block is the flat halftone region or not based on densitydifferences between adjacent pixels in the segment block.

With this arrangement, the use of the density differences between theadjacent pixels allows more accurate determination as to whether thesegment block is the flat halftone region or not.

In addition to the above arrangement, the image processing apparatusaccording to the present invention may be arranged such that the segmentblock is partitioned into a predetermined number of sub segment blocks;and the flat halftone discriminating means finds average densities ofpixels in the sub segment blocks, and performs the discriminationwhether the segment block is the flat halftone region or not based on adifference(s) between the average densities of the sub segment blocks.

With this arrangement, the flat halftone discriminating means uses thedifference(s) in the average densities between the sub blocks indetermining the flat halftone region. Therefore, the processing time ofthe flat halftone discriminating means can be shorter compared with thearrangement in which the difference between the pixels is used.

An image forming apparatus may be provided with the image processingapparatus of any of these arrangements.

By employing an image process in which the halftone frequency of theinput image data is considered, e.g., by employing a filter process mostsuitable for the halftone frequency, this arrangement suppresses themoire while avoiding deterioration of the sharpness and out-of-focusingas much as possible. Moreover, by detecting a character on halftone onlyin the halftone regions of 133 line/inch or higher and performing a mostsuitable process for such a character on halftone, it is possible tosuppress the image quality deterioration by erroneous determinationwhich is frequently caused for the halftones of halftone frequenciesless than 133 line/inch. With this, it is possible to provide an imageforming apparatus that outputs an image of good quality.

An image reading process apparatus may be provided with the imageprocessing device of any of these arrangements.

With this arrangement, it becomes possible to output a halftonefrequency determination signal based on accurate halftone frequencydetermination with respect to the halftone region included in thedocument.

By using an image process program for causing a computer to serve aseach means of the image processing device of any of these arrangement,it is possible to easily realize the each means by using ageneral-purpose computer.

Moreover, the image processing program is preferably stored in acomputer-readable storage medium.

With this arrangement, it is possible to easily realize the imageprocessing apparatus on the computer by using the image processingprogram read out from the storage medium.

Moreover, an image processing method according to the present inventionis applicable to digital color copying machines. In addition, the imageprocessing method is also applicable to any apparatus that is requiredto reproduce the inputted image data with higher reproduction quality.An example of such an apparatus is an image reading apparatus such asscanners.

The invention being thus described, it will be obvious that the same waymay be varied in many ways. Such variations are not to be regarded as adeparture from the spirit and scope of the invention, and all suchmodifications as would be obvious to one skilled in the art are intendedto be included within the scope of the following claims.

1. An image processing apparatus comprising: halftone frequencydetermining means for determining a halftone frequency of an image thathas been read from a document by an image reading apparatus, thehalftone frequency determining means comprising: flat halftonediscriminating means for extracting information of density distributionper segment block consisting of a plurality of pixels, anddiscriminating, based on the information of density distribution,whether the segment block is a flat halftone region in which densitytransition is low, or a non-flat halftone region in which the densitytransition is high; threshold value determining means for determining athreshold value by using an adjusting value that is predetermined inaccordance with a reading property of the image reading apparatus withrespect to respective color components, the threshold value being foruse in extraction of a feature of density transition between pixels;extracting means for extracting, by using the threshold value determinedby the threshold value determining means, the feature of densitytransition between pixels of the segment block which the flat halftonediscriminating means discriminates as the flat halftone region; andhalftone frequency estimating means for estimating the halftonefrequency, based on the feature extracted by the extracting means.
 2. Animage processing apparatus as set forth in claim 1, wherein: theextracting means comprises: binarization means for performing thebinarization in order to generate binary data of each pixel of thesegment block according to the threshold value determined by thethreshold value determining means; transition number calculating meansfor calculating a transition number of the binary data generated by thebinarization means; and transition number extracting means forextracting, as the feature, a transition number of the segment blockwhich the flat halftone discriminating means discriminates as the flathalftone region, from among the transition numbers calculated out by thetransition number calculating means.
 3. An image processing apparatus asset forth in claim 1, wherein: the extracting means comprises:binarization means for performing the binarization in order to generate,according to the threshold value determined by the threshold valuedetermining means, binarization data of each pixel in the segment blockthat the flat halftone discriminating means discriminates as the flathalftone region; and transition number calculating means for calculatingout, as the feature, a transition number of the binary data generated bythe binarization means.
 4. An image processing apparatus as set forth inclaim 2, wherein: the threshold value determining means determines thethreshold value from an average density of the pixels in the segmentblock.
 5. An image processing apparatus as set forth in claim 3,wherein: the threshold value determining means determines the thresholdvalue from an average density of the pixels in the segment block.
 6. Animage processing apparatus as set forth in claim 2, wherein: thethreshold value determining means determines the threshold value fromdensity information of the segment block.
 7. An image processingapparatus as set forth in claim 3, wherein: the threshold valuedetermining means determines the threshold value from densityinformation of the segment block.
 8. An image processing apparatus asset forth in claim 1, wherein: the flat halftone discriminating meansperforms the discrimination whether the segment block is the flathalftone region or not based on density differences between adjacentpixels in the segment block.
 9. An image processing apparatus as setforth in claim 1, wherein: the segment block is partitioned into apredetermined number of sub segment blocks; and the flat halftonediscriminating means finds average densities of pixels in the subsegment blocks, and performs the discrimination whether the segmentblock is the flat halftone region or not based on a difference(s)between the average densities of the sub segment blocks.
 10. An imageforming apparatus comprising: an image processing apparatus comprising:halftone frequency determining means for determining a halftonefrequency of an image that has been read from a document by an imagereading apparatus, the halftone frequency determining means comprising:flat halftone discriminating means for extracting information of densitydistribution per segment block consisting of a plurality of pixels, anddiscriminating, based on the information of density distribution,whether the segment block is a flat halftone region in which densitytransition is low, or a non-flat halftone region in which the densitytransition is high; threshold value determining means for determining athreshold value by using an adjusting value that is predetermined inaccordance with a reading property of the image reading apparatus withrespect to respective color components, the threshold value being foruse in extraction of a feature of a density transition between pixels;extracting means for extracting, by using the threshold value determinedby the threshold value determining means, the feature of densitytransition between pixels of the segment block which the flat halftonediscriminating means discriminates as the flat halftone region; andhalftone frequency estimating means for estimating the halftonefrequency, based on the feature extracted by the extracting means. 11.An image reading process apparatus comprising: an image processingapparatus comprising: halftone frequency determining means fordetermining a halftone frequency of an image that has been read from adocument by an image reading apparatus, the halftone frequencydetermining means comprising: flat halftone discriminating means forextracting information of density distribution per segment blockconsisting of a plurality of pixels, and discriminating, based on theinformation of density distribution, whether the segment block is a flathalftone region in which density transition is low, or a non-flathalftone region in which the density transition is high; threshold valuedetermining means for determining a threshold value by using anadjusting value that is predetermined in accordance with a readingproperty of the image reading apparatus with respect to respective colorcomponents, the threshold value being for use in extraction of a featureof density transition between pixels; extracting means for extracting,by using the threshold value determined by the threshold valuedetermining means, the feature of density transition between pixels ofthe segment block which the flat halftone discriminating meansdiscriminates as the flat halftone region; and halftone frequencyestimating means for estimating the halftone frequency, based on thefeature extracted by the extracting means.
 12. An image processingmethod comprising: determining a halftone frequency of an image that hasbeen read from a document by an image reading apparatus, the step ofdetermining the halftone frequency comprising: discriminating a flathalftone, the step of discriminating including (a) extractinginformation of density distribution per segment block consisting of aplurality of pixels, and (b) discriminating, based on the information ofdensity distribution, whether the segment block is a flat halftoneregion in which density transition is low, or a non-flat halftone regionin which the density transition is high; determining a threshold valueby using an adjusting value that is predetermined in accordance with areading property of the image reading apparatus with respect torespective color components, the threshold value being for use inextraction of a feature of density transition between pixels;extracting, by using the threshold value determined in the step ofdetermining, the feature of density transition between pixels of thesegment block which the step of discriminating discriminates as the flathalftone region; and estimating the halftone frequency, based on theextracted feature.
 13. An image processing method as set forth in claim12, wherein: the step of extracting comprises: performing thebinarization in order to generate binary data of each pixel in thesegment block according to the threshold value determined in the step ofdetermining the threshold value; calculating out transition numbers ofthe binary data; and extracting, as the feature, a transition number ofthe segment block which the step of discriminating discriminates as theflat halftone region, from among the calculated-out transition numbers.14. An image processing method as set forth in claim 12, wherein: thestep of extracting comprises: performing the binarization in order togenerate, according to the threshold value determined in the step ofdetermining the threshold value, binarization data of each pixel in thesegment block that the step of discriminating discriminates as the flathalftone region; and calculating out, as the feature, a transitionnumber of the binary data generated in the step of performing thebinarization.
 15. An image processing method as set forth in claim 13,wherein: the step of determining the threshold value determines thethreshold value from an average density of the pixels in the segmentblock.
 16. An image processing method as set forth in claim 14, wherein:the step of determining the threshold value determines the thresholdvalue from an average density of the pixels in the segment block.
 17. Animage processing method as set forth in claim 13, wherein: the step ofdetermining the threshold value determines the threshold value fromdensity information of the segment block.
 18. An image processing methodas set forth in claim 14, wherein: the step of determining the thresholdvalue determines the threshold value from density information of thesegment block.
 19. An image processing method as set forth in claim 12,wherein: in the step of discriminating, the discrimination whether thesegment block is the flat halftone region or not is performed based ondensity differences between adjacent pixels in the segment block.
 20. Animage processing method as set forth in claim 12, wherein: the segmentblock is partitioned into a predetermined number of sub segment blocks;the step of discrimination finds an average density of the pixels ineach sub segment block; and the discrimination whether the segment blockis the flat halftone region or not is performed based on a difference(s)between average densities of the sub segment blocks.
 21. An imageprocessing program for operating an image processing apparatuscomprising halftone frequency determining means for determining ahalftone frequency of an image that has been read from a document by animage reading apparatus, the halftone frequency determining meanscomprising: flat halftone discriminating means for extractinginformation of density distribution per segment block consisting of aplurality of pixels, and discriminating, based on the information ofdensity distribution, whether the segment block is a flat halftoneregion in which density transition is low, or a non-flat halftone regionin which the density transition is high; threshold value determiningmeans for determining a threshold value by using an adjusting value thatis predetermined in accordance with a reading property of the imagereading apparatus with respect to respective color components, thethreshold value being for use in extraction of a feature of densitytransition between pixels; extracting means for extracting, by using thethreshold value determined by the threshold value determining means, thefeature of density transition between pixels of the segment block whichthe flat halftone discriminating means discriminates as the flathalftone region; and halftone frequency estimating means for estimatingthe halftone frequency, based on the feature extracted by the extractingmeans, and the program causing a computer to serve as each means.
 22. Acomputer-readable recording medium in which an image processing programfor operating an image processing apparatus comprising halftonefrequency determining means for determining a halftone frequency of animage that has been read from a document by an image reading apparatusis stored, the halftone frequency determining means comprising: flathalftone discriminating means for extracting information of densitydistribution per segment block consisting of a plurality of pixels, anddiscriminating, based on the information of density distribution,whether the segment block is a flat halftone region in which densitytransition is low, or a non-flat halftone region in which the densitytransition is high; threshold value determining means for determining athreshold value by using an adjusting value that is predetermined inaccordance with a reading property of the image reading apparatus withrespect to respective color components, the threshold value being foruse in extraction of a feature of density transition between pixels;extracting means for extracting, by using the threshold value determinedby the threshold value determining means, the feature of densitytransition between pixels of the segment block which the flat halftonediscriminating means discriminates as the flat halftone region; andhalftone frequency estimating means for estimating the halftonefrequency, based on the feature extracted by the extracting means, andthe program causing a computer to serve as each means.